Tuesday, 24 May 2016

Writing a program that accepts a character and determines whether the character is a lowercase letter. a lowercase letter is any letter that is greater than equal to 'a' and less than or equal to 'z'. if the entered character is a lowercase letter, display the message "Entered character is a lowercase letter" , otherwise display the message "Entered character is not a lowercase letter".



Program:
      #include<iostream.h>
      #include<conio.h>
      void main()
      {
      char letter;
      clrscr();      
      cout<<"enter a character:";
      cin>>letter;
      if(letter>='a' && letter<='z')
          cout<<"Entered character is a lowercase letter\n";
      else
          cout<<"Entered character is not a lowercase letter";
      getche();
      }

3 comments: