NBA - Boston Celtics

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