0

C++ help needed

Can someone pls help with this code in c++??? Write a program, enter a character, if it is an uppercase letter, change it to the corresponding lowercase letter and output it. If it is a digit, change it to the corresponding value and output it.

6th Mar 2019, 6:05 AM
walka
1 Respuesta
+ 10
Hint: ● Include <cctype> header file. ● Use `isalpha` function to check for alphanumeric characters ('A' - 'Z', 'a' - 'z'). http://www.cplusplus.com/reference/cctype/isalpha/ ● Use `isdigit` function to check for numeric characters ('0' - '9'). http://www.cplusplus.com/reference/cctype/isdigit/ ● To get a character's value as a number you can do `int num = <char> - '0';` where <char> is the character to be converted. You alone can do this, good luck! 👍
6th Mar 2019, 7:47 AM
Ipang