Copy Code:
#include<iostream>
using namespace std;
int main()
{
char ch ;
cout << "Enter any character : ";
cin >> ch;
if (ch>='A' && ch<='Z')
cout << ch << " is a Capital Letter";
else if (ch>='a' && ch<='z')
cout << ch << " is a Small Letter";
else if (ch>='0' && ch<='9')
cout << ch << " is a Digit";
else
cout << ch << " is a Special Character";
return(0);
}
No comments:
Post a Comment