1、C 语言复习提纲二、用 C 语言编写以下的程序1.从键盘输入一个字符,然后将这个字符输出到屏幕。#include#includeint main()char a;a=getchar();putchar(a); system(“pause“);2.从键盘输入一个大写字母,要求改用小写字母输出。#include#include#includeint main()char a1;gets(a);puts(strlwr(a);system(“pause“);3.输出所有的“水仙花数” ,所谓“水仙花数”是指一个 3 位数,其各位数字立方和等于该数本身。例如,153 是一水仙花数,因为 1531 3+5
2、3+33。#include#includemain()int a,b,c,i;for (i=100;i#includeint main()int i,a,b;a=1;b=1;printf(“%d,%d“,a,b);for (i=2;i#includeint main()int i,a,b;scanf(“%d“,b=0;for (i=1;i#includeint main()int i,a6=9,8,5,3,2,b;for (i=0;iai)b=a5;a5=ai;ai=b;for (i=0;i#includeint main()int i,j,b;for (i=100;i#includeint
3、main()int a=2,b=0,c,i,j,n;scanf(“%d“,c=a;for (i=1;i#include101052kkint main()int a=0,b=0,i;float c=0;for (i=1;i#includeint main()int a=0,b=1,i,j;for (i=1;i#includeint main()float a=1,b=1,c=0;int i;for (i=1;i#includeint main()int a10,b,i,j;for (i=0;i#includeint main()int a5=1,2,3,4,5,b,i;for (i=0;i#i
4、ncludeint main()int a1010,i,j,n;for (i=0;i#includeint main()int a,b=0,i;scanf(“%d“,for (i=1;i#include#includeint main()char a30,b30;gets(a);gets(b);puts(strcat(a,b);system(“pause“);17. 字写一个函数,使输入的一个字符串反序存放,在主函数中输入和输出字符串。#include#include#includeint main()char a30,i,j,b;scanf(“%s“,j=strlen(a);for (i=0;i#includeint mymax(int a34)int i,j,b;b=a00;for (i=0;i3;i+)for (j=0;j4;j+) if (baij) b=aij;return b;int main()int a34,i,j,max;for (i=0;i3;i+)for (j=0;j4;j+) scanf(“%d“,max=mymax(a);printf(“%d“,max);system(“pause“);