Condition to check whether the character is Alphabet or not !
#include <stdio.h>
#include <stdlib.h>
int main()
{
char ch;
printf("Enter any character: ");
scanf("%c", &ch);
if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
{
printf("Character is an ALPHABET.");
}
else
{
printf("Character is Not ALPHABET.");
}
return 0;
}
Comments
Post a Comment