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语言编程:输入三个数取最大值/三个数求最大值
  • 热门搜索
    懋怎么读 过敏怎么治 烙饼的做法视频 肚子疼怎么办 苹果怎么分屏 蒸饭的做法 苹果派的做法家庭版 桦怎么读 炖鸡腿的家常做法 新鲜竹笋的做法