C Program to identify user entered number,Capital Letter, Small Letter or Symbol

C Program to identify user entered number,Capital Letter, Small Letter or Symbol




#include
#include
main()
{
char c;
clrscr();
printf (" enter any character");
scanf ("%c",&c);
if(c>=65 && c<=90)
printf (" capital letter");
else
{
if(c>=97 && c<=122)
printf (" small letter");
else
{
if(c>=48 && c<=57)
printf (" digit");
else
printf (" symbol");
}
}
getch();
}


No comments:

Post a Comment