Question: Write a program in c + + that repeatedly requests the user to enter an alphabetic character or a digit from 0 9 . Then,

Write a program in c++ that repeatedly requests the user to enter an alphabetic character or a digit from 09. Then, print a message identifying the character as a number, a lower case letter, or an uppercase letter. Print an error message if the user enters something other than a digit or alphabetic character. Then, have your program exit.
HINT: You will want to find a website that lists the ASCII characters decimal values. However, the best solutions will not compare a character to a number.
For example, while the following works:
if(myChar >97){}
For readability, the following is preferable:
if(myChar >a){}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!