#include
#include
void main()
{
clrscr();
char charac;
cout << "Enter your input : " << endl;
cin>>charac;
if(((charac>='A')&&(charac<='Z'))||((charac>='a')&&(charac<='z')))
cout << "Your input " << charac << " is a character." << endl;
else if((charac>='0')&&(charac<='9'))
cout << "Your input " << charac << " is a digit." << endl;
else
cout << "Your input " << charac << " is a symbol." << endl;
getch();
}
This blog is basically created to provide the links to best available softwares..!! Also you'll get links to good movies, songs and wallpapers here..!! Much more..... Visit.. Enjoy...........!! Abhimanyu Gupta..!!
Thursday, March 25, 2010
A simple C++ program..
One of my colleague wanted the simplest and shortest program for indentifying whether the input is alphabet, letter or symbol.. I gave this solution. Tell me if you can write the shorter one..!
Subscribe to:
Post Comments (Atom)
1 comment:
Next will be the programs on dot net languages..!! Keep bugging..!!
Post a Comment