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

Calculate Factorial of a given no with help of Recursion

Get a string Using gets() function

Use of conditional Operators