C++ Program to convert a lowercase alphabet to uppercase or vice-versa

#include<iostream.h>
#include<conio.h>

void main()
{
clrscr();
char ch;
cout<<“Enter any Alphabet:”;
cin>>ch;

if(ch>=’a’&&ch<=’z’)
{
cout<<“ntYou have entered a lowercase alphabet”;
ch=ch-32;
cout<<“nnThe uppercase alphabet is “<<ch;
}
else
{
cout<<“ntYou have entered an Uppercase alphabet”;
ch=ch+32;
cout<<“nnThe lowercase alphabet is “<<ch;
}
getch();
}

6 thoughts on “C++ Program to convert a lowercase alphabet to uppercase or vice-versa

  1. nikhil tomar

    Thanks, it's working.
    btw it is not 'Alphabate' it is 'Alphabet'
    😀

    Reply
    1. Neeraj Mishra

      Hello Nikhil,
      I have done the changes, thanks a lot for informing me.

      Reply
  2. junaid kundi

    hi neeraj if u upload the output of this program then….

    Reply
  3. hassam

    Write a program that take a 10 letter word and remove letter x ( one or more ) if it is found anywhere in the word. For example, if I write Texonomyte it will convert it and display like
    Te onomyte.
    (if, char data type )
    then contact me at my whatsapp 0324-4944022.

    Reply
    1. bharat gurbaxani

      #include
      #define loop(i,n)for(int i=0;i>word[i];
      if(word[i] == ‘x’ || word[i] == ‘X’){
      cout<<" ";
      }
      else{
      cout<<word[i];
      }
      }
      return 0;
      }

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.