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

Popular posts from this blog

Check whether the no entered is Palindrome or not

Calculate Factorial of a given no with help of Recursion

Find max. and min. element in the integer array