Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- char ch;
- cout << "Enter any character: ";
- cin >> ch;
- if ((ch >= 'A') && (ch <= 'Z'))
- cout << "It is an Uppercase letter";
- else if ((ch >= 'a') && (ch <= 'z'))
- cout << "It is a lowercase letter";
- else if ((ch >= '0') && (ch <= '9'))
- cout << "It is a digit";
- else
- cout << "It is a special character";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement