In: Computer Science
#include <iostream>
using namespace std;
int main()
{
char ch;
cout<<"Enter Any Character:";
cin>>ch;
if(ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U')
//Check for enter character is "Upper Case Vowel"
{
cout<<"Upper Case Vowel";
}
else if(ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch ==
'u')//Check for enter character is "Lower Case Vowel"
{
cout<<"Lower Case Vowel";
}
else if(ch == '!' || ch == '@' || ch == '#' || ch == '$' || ch ==
'%' || ch == '^' || ch == '&' || ch == ' ' || ch == '(' || ch
== ')' || ch == '*' || ch == '"' || ch == '+' || ch == ',' || ch ==
'-' || ch == '.' || ch == '/' || ch == ':' || ch == ';' || ch ==
'<' || ch == '=' || ch == '>' || ch == '?'|| ch == '['|| ch
== ']'|| ch == '~' || ch == '|'|| ch == '}'|| ch == '{'|| ch ==
'`'|| ch == '_')//Check for enter character is "Special
Character"
{
cout<<"Special Character";
}
else if(ch == 'b' || ch == 'c' || ch == 'd' || ch == 'f' || ch ==
'g' || ch == 'h' || ch == 'j' || ch == 'k' || ch == 'l' || ch ==
'm' || ch == 'n' || ch == 'p' || ch == 'q' || ch == 'r' || ch ==
's' || ch == 't' || ch == 'v' || ch == 'w' || ch == 'x' || ch ==
'y' || ch == 'z' )//Check for enter character is "Lower Case
Constant"
{
cout<<"Lower Case Constant";
}
else if(ch == 'B' || ch == 'C' || ch == 'D' || ch == 'F' || ch ==
'G' || ch == 'H' || ch == 'J' || ch == 'K' || ch == 'L' || ch ==
'M' || ch == 'N' || ch == 'P' || ch == 'Q' || ch == 'R' || ch ==
'S' || ch == 'T' || ch == 'V' || ch == 'W' || ch == 'X' || ch ==
'Y' || ch == 'Z' )//Check for enter character is "Upper Case
Constant"
{
cout<<"Upper Case Constant";
}
else if(ch == '0' || ch == '1' || ch == '2' || ch == '3' || ch ==
'4' || ch == '5' || ch == '6' || ch == '7' || ch == '8' || ch ==
'9' )//Check for enter character is "Integer"
{
cout<<"Integer";
}
else //when enter character is non of the above
{
cout<<"Your enter character is not integer, character and
Special character";
}
return 0;
}