#include <iostream> using namespace std; int main() { char charVal; cout << "Enter the character"<< endl; cin >> charVal; if (charVal >= 'a' && charVal <= 'z') { cout << "The lowercase character"; } else if (charVal >= 'A' && charVal <= 'Z') { cout << "The uppercase character"; } else if (charVal >= '1' && charVal <= '9') { cout << "The numeric character"; } else cout << "The non alpha-numeric character"; return 0; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter