Saturday, 10 December 2011

a program to input a word and find out it is a Capital letter ,Small letter ,Decimal Number and a Special Character in c

#include
#include
main()
{
char d;
clrscr();
printf("\n Type ");
scanf("%c",&d);

if(d>=65 && d<=90) printf("A word is capital latter"); else if(d>=97 && d<=122) printf("A word is small latter"); else if(d>=48 && d<=59)
printf("A word is decimal number");
else
printf("is a special charactor");
getch();
}

OUTPUT
Type ANAND
A word is capital latter

No comments:

Post a Comment