C & C++ language
Home
HTML
C&C++ language
Movies
Games
Softwares
Sunday, 18 November 2012
Check whether character entered is number or alphabet
#include<iostream.h>
void main()
{
char a;
cout<<"enter a charchter : ";
cin>>a;
if(a>='a'&&a<='z')
{
cout<<"you have entered a alphabet ..";
}
else
{
cout<<"you have entered a number";
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment