Write a program to determine whether the character entered is a capital letter, a small case letter, a digit or a special symbol.
#include<stdio.h>
void main()
{
char ch;
printf("\nEnter the character: ");
scanf("%c",&ch);
if(ch >= 65 && ch <= 90)
printf("\n%c is uppercase",ch);
else if(ch >= 97 && ch <= 122)
printf("\n%c is lowercase",ch);
else if(ch >= 48 && ch <= 57)
printf("\n %c is a digit");
else
printf("\n %c is a special character");
}
Post A Comment:
0 comments: