Solution :
#include<stdio.h>
#include<conio.h>
int main()
{
char ch;
scanf("%c", &ch);
if(ch>='a' && ch <='z')
printf("%c",ch-32);
else
printf("%c",ch);
getch();
}
Program Analysis :
Here ch is a character type variable,we use % c to get input character from user or terminal.-32 works like a converter to convert lowercase letter to uppercase.
The program says,If any lowercase number inputted by user then convert it to uppercase number otherwise print the number what user inputted because it is already uppercase character.
Post a Comment