Enter any character through keyboard, determine whether it is capital, small, digit or special character.
4.
|
Enter
any character through keyboard, determine whether it is capital, small, digit
or special character.
|
#include<stdio.h>
#include<conio.h>
void main()
{
char c;
clrscr();
printf("Enter Any Character=");
scanf("%c",&c);
if(c>=65 && c<=90)
printf("The character is in Upper Case");
else if(c>=97 && c<=122)
printf("The character is in Lower Case");
else if(c>=45 && c<=57)
printf("The Character is Number");
else
printf("the Character is Special
Character");
getch();
}
Comments
Post a Comment