Thursday, September 27, 2018

Changing lowercase character into uppercase

#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 lowercase letter and convert into Upper case
if(islower(ch))
ch=toupper(ch);

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

}

No comments:

Post a Comment