Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this program, you can use these statements if-else, do-while, while, switch, and for. Problem 2 Write a program that converts lowercase alphabets to uppercase
In this program, you can use these statements if-else, do-while, while, switch, and for.
Problem 2 Write a program that converts lowercase alphabets to uppercase alphabets. Your program shou prompt the user to enter a character. Ifthe user did not enter a valid character (i.e. a through z), you have to tell the user that the entry is incorrect. If the user entered a valid character, you'll have convert this user entered lowercase character to its corresponding uppercase character and display t result For example, if the user enters a, you'll have to display A. (10 point HINT: a. You will need a character variable, and ask the user for its value. b. You will have to check whether the entered character is a valid character or not. For that, you will have to check its ASCII value. Remember the characters a through z have a continuous ASCII values. c. ASCII values are integers. To convert to uppercase, you'll have to subtract something (think what) from the ASCII values. The uppercase alphabets have continuous ASCII values as well Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started