Check character entered is in lower case or not
#include<stdio.h>
#include<conio.h>
int main() {
char ch;
printf("\nEnter The Character : ");
scanf("%c", &ch);
if (ch >= 'A' && ch <= 'Z') {
printf("Character is in uppercase Letters");
} else if (ch >= 'a' && ch <= 'z') {
printf("Character is in Lowercase Letters");
} else {
printf("Non alphabet character");
}
return(0);
}
Output:-
Enter The Character : r
Character is in Lowercase Letters
Comments
Post a Comment