#include<iostream.h>
#include<conio.h>
#include<ctype.h>
void main()
{
clrscr();
char ch;
cout<<"enter any no. or alphabet: ";
cin>>ch;
if(isdigit(ch))
{
cout<<"It is a digit";
}
else if(isalpha(ch))
{
cout<<"It is a alphabet";
}
getch();
}
No comments:
Post a Comment