C语言输入一个小写字母要求输出一个大写字母。

 时间:2026-04-23 03:58:58

#include<stdio.h>

int main()

{

int one;

int two;

printf("please enter one char:\n");

one = getchar();

two = one - 32;

putchar(two);

printf("%c\n",two);

putchar('\n');

return 0;

}

C语言输入一个小写字母要求输出一个大写字母。

扩展资料

输入一个小写字母输出一个对应的大写字母

#include<stdio.h>

int main()

{   

char a,b;

scanf("%c",&a);

b=a+32;

printf("%c",b);

return 0;

}

  • C语言中的基本数据类型
  • C语言数组从小到大进行排序(冒泡法排序)
  • C语言如何打印九九乘法表?
  • c语言如何输入10个整数求其平均值?
  • C语言编程:输入三个数取最大值/三个数求最大值
  • 热门搜索
    四喜丸子怎么做 李世民怎么死的 怎么学画画 长痔疮怎么办 银龙鱼怎么养 斜刘海怎么剪 策划怎么写 头晕想吐是怎么回事 金针菇根怎么再生 反复发烧怎么办