1317: 大小写判断与转换
1.描述
输入一个字母,若是小写字母,则变为大写输出,否则,原样输出。
输入
输入为一个字符。
输出
按题目要求输出一个字符,单独占一行。
样例输入
a
样例输出
A
2.代码
#include <stdio.h>
#include<math.h>
int main()
{
char xx,dx;
scanf("%c",&xx);
dx=xx-32;
if (xx>='A'&&xx<= 'Z' )
{
printf("%c",xx);
}
else
{
printf("%c",dx);
}
return 0;
}