Sunday, September 23, 2012

Program 10 Check Character, Number or Digit


#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("enter value of charecter:");
scanf("%c",&ch);
if(ch>=65&&ch<=90)
{
printf("this is capital letter alphabet");

}
else if(ch>=97&&ch<=122)
{
printf("this is smaller letter alphabet");
}
else if(ch>=48&&ch<=57)
{
printf("this is a digits");
}
else
{
printf("this is special symbol");
}
getch();
}

No comments:

Post a Comment