Thursday, September 27, 2018

Changing an uppercase character into lower case

#include<ctype.h>
#include<iostream>
using namespace std;

main()
{
char ch;
cout<<" Enter a character ";
cin>>ch;

cout<<"Enter Character = "<<ch;
// Check whether entered characetr is an uppercase letter and convert into Lower case
if(isupper(ch))
ch=tolower(ch);

cout<<"Changed case character  = "<<ch;

}

No comments:

Post a Comment