// 输入一个小写字母,输出对应的大写字母
#include <stdio.h>
int main(){
char ch;
scanf("%c", &ch); // 输入一个字母
printf("%c\n", ch - 32); // 小写字母的ASCII值减32为对应大写字母
system("pause"); // 按任意键继续
return 0;
}
C语言习题——输入一个小写字母,输出对应的大写字母
最新推荐文章于 2024-06-03 20:41:15 发布