Input a character and check whether it is a Capital letter, Small letter, a Digit or a Special character.
#include
void main()
{
char ch;
ch=getchar();
if(ch >= ’A’ && ch <= ’Z’)
cout<<”Capital letter”;
else
if(ch >= ’a’ && ch <= ’z’)
cout<<”Small letter”;
else
if(ch >= ’0’ && ch <= ’9’)
cout<<”Digit”;
else
cout<<”Special character ”;
}
Friday, December 4, 2009
Home »
a Digit or a Special character
,
C++ PROGRAM FOR CHECKING A CHARACTER
,
Capital letter
,
CAPITAL LETTER PROGRAM C++
,
Small letter
» C++->Capital letter, Small letter, a Digit or a Special character.
C++->Capital letter, Small letter, a Digit or a Special character.
4:28 AM
a Digit or a Special character, C++ PROGRAM FOR CHECKING A CHARACTER, Capital letter, CAPITAL LETTER PROGRAM C++, Small letter
No comments
0 comments:
Post a Comment