DESCRIPTION-:THIS PROGRAM CONVERT A LOWERCASE LETTER INTO
UPPERCASE LETTER.
FOR EXAMPLE-: IF WE ENTER INPUT LOWERCASE LETTER AS------------
r
THEN IT GENERATES OUTPUT AS-----------
THE UPPERCASE EQUIVALENT=R
PROGRAM-:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
char ch;
cout<<"enter the lowercase character"<<"\n";
cin>>ch;
char ch2=(ch>='a'&&ch<='z')?('A'+ch-'a'):ch;
cout<<"uppercase equivalent is "<<ch2;
getch();
}
UPPERCASE LETTER.
FOR EXAMPLE-: IF WE ENTER INPUT LOWERCASE LETTER AS------------
r
THEN IT GENERATES OUTPUT AS-----------
THE UPPERCASE EQUIVALENT=R
PROGRAM-:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
char ch;
cout<<"enter the lowercase character"<<"\n";
cin>>ch;
char ch2=(ch>='a'&&ch<='z')?('A'+ch-'a'):ch;
cout<<"uppercase equivalent is "<<ch2;
getch();
}
0 comments:
Post a Comment