Question

Declare all variables 1.Prompt the user for a letter 2.Scan/read the character from the keyboard 3.Change...

Declare all variables
1.Prompt the user for a letter
2.Scan/read the character from the keyboard
3.Change the letter to uppercase
4.Print both the original letter and uppercase letter onto the screen
0 0
Add a comment Improve this question Transcribed image text
Answer #1
#include <stdio.h>

int main() {
    char letter, upper;
    printf("Enter a letter: ");
    scanf(" %c", &letter);
    if(letter >= 'a' && letter <= 'z') {
        upper = (char) (letter - 32);
    }
    printf("Lowercase = %c and Uppercase = %c\n", letter, upper);
    return 0;
}
Add a comment
Know the answer?
Add Answer to:
Declare all variables 1.Prompt the user for a letter 2.Scan/read the character from the keyboard 3.Change...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT