//C++ program : To change the letter case (uppercase to lowercase and viceversa)
#include
using namespace std;
int main()
{
char ch;
do
{ cout <<"\n Enter a character (0 to terminate): ";
ch=getchar();
if (ch>=65 && ch<=90) // if uppercase
ch = ch + 32; // change to lowercase
else
if (ch >=97 && ch <= 122)// if lowercase
ch = ch -32; // change to lowercase
putchar(ch);
} while (ch!='0');
system ("pause");
return 0;
}
Note: In the program, After #include "iostream" tag is there...
But it is not seen as the post is considered as a HTML post...
So please don't forget this point...
The original file is uploaded as attachment...
Check that also...
With Regards,
ZORO
IIT Madras - CSE
Attachments
To change the letter case (uppercase to lowercase and viceversa) (2091-31913-To change the letter case (uppercase to lowercase and viceversa).txt)