This program will ask user to enter any character, if the user enter uppercase letter the program will convert it into lowercase letter and vice versa.
This program is capable of convert only a character, for string conversion please check this ONE
#include<conio.h>
main()
{
char a;
cout<<"Enter your letter ";
cin>>a;
if(a>=65 && a<=90)
a=a+32;
else if (a>=97 && a<=122)
a=a-32;
cout<<endl<<a<<endl;
getche();
clrscr();
}
This program is capable of convert only a character, for string conversion please check this ONE
CODING
#include<iostream.h>#include<conio.h>
main()
{
char a;
cout<<"Enter your letter ";
cin>>a;
if(a>=65 && a<=90)
a=a+32;
else if (a>=97 && a<=122)
a=a-32;
cout<<endl<<a<<endl;
getche();
clrscr();
}