whether the character Entered through the keyboard is a lower case alphabet or not
whether the character Entered through the keyboard is a lower case alphabet or not
#include<stdio.h>
int main()
{
char ch;
//Input character from user
printf("Enter any character:");
scanf("%c",&ch);
if(ch>='A'&&ch<='Z')
{
printf("%c is Uppercase alphabet.",ch);
}
else if(ch>='a'&&ch<='z)
{
printf("%c is lowercase alphabet",ch);
}
else
{
printf("%c is not alphabet",ch);
}
return 0;
} .
output
Enter any character:U
is Uppercase alphabet.
related example--
Comments
Post a Comment