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();
}

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

  1. 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.

    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;
      }

  2. if there are more words then one words and “space are between” the words than this program just convert the first alphabet but i want to convert more then one alphabets.

Leave a Comment

Your email address will not be published.