Program to Check Whether Character is Lowercase or Not without using islower function 1

Program to Check Whether Character is Lowercase or Not without using islower function

#include 

int main()
{
  char Ch;

  printf("\n Please Enter any alphabet\n");
  scanf("%c", &Ch);

  if (Ch >= 'a' && Ch <= 'z')
   {  
     printf ( "\nEntered character is lowercase alphabet") ;
   }
  else
   {
     printf("\nEntered character is Not lowercase alphabet");
   }  
}

Here is what the above code is Doing:
1. We are taking a character as input from the user.
2. We are checking whether the character is lowercase or not.
3. If the character is lowercase, then the program will print the message "Entered character is lowercase alphabet".
4. If the character is not lowercase, then the program will print the message "Entered character is Not lowercase alphabet".

Similar Posts