C++ Program To Convert A Lower Case To Upper Case Or Vice-Versa

Problem :- Write A Program To Convert A Lower Case To Upper Case Or Vice-Versa

Logic :- Convert Lower to upper and upper to lower .we use ASCII value as we know that 'a' to 'z' ASCII is '97' to '122' And 'A' to 'Z' ASCII is '65' to '90' .
so if want to convert lower to upper then minus 32 to character 
and if you want to convert upper to lower then add 32 to character .

Solution :-

using namespace std;
int main()
  //By-Ghanendra Yadav
  char ch;
  cout<<"Enter any Alphabet :\n";

  cout<<"\nYou Entered A Lowercase Alphabet\n";
  cout<<"\nThe uppercase alphabet is "<<ch;
  cout<<"\nYou Entered An Uppercase Alphabet\n";
  cout<<"\nTe Lowercase Alphabet Is "<<ch;
return 0;



C++ Program To Convert A LowerCase To UpperCase Or Vice-Versa

Ghanendra Yadav

Ghanendra Yadav

Hello, I Am Ghanendra Yadav Owner of This Blog, I am professional Blogger and Programmer. I Love Programming, Logo Making, And Banner Designing. My Highest Qualification is MCA From NIT Warangal. You Can Find Me On Social Media Through Below Link And If You Have Any Query Related To Programming And Other Subject Comment Below or You Can Mail Me I Will Try To Answer Within 24 Hours Email:- yghanendra@student.nitw.ac.in

Find me on Social Media

Facebook | Twitter | Google+ | RSS Feed

No comments:

Post a Comment