10 2021 档案
摘要:1.输入学生成绩,输出评级。 #include<stdio.h> main() { int mark; printf("输入学生的分数(0-100)"); scanf("%d",&mark); switch(mark/10) { case 10: case 9:printf("A\n");break
阅读全文
摘要:1.编写程序,判断一个数n是正数还是负数。 #include<stdio.h> main() { float n; scanf("%f",&n); if(n>0) printf("正数\n"); else if(n==0) printf("既不是正数也不是负数"); else printf("负数"
阅读全文
摘要:1.编写程序,定义两个整型变量,赋值并输出。 #include<stdio.h> main() { int a=7; int b=6; printf("%d,%d",a,b); } 2.编写程序,定义一个单精度和双精度的变量,赋值并输出。 #include<stdio.h> main() { flo
阅读全文
摘要:1.编写程序,输出“我爱学习c语言!”。 #include<stdio.h> main() { printf("我爱学习c语言!"); } 2.分行输出自己的专业和姓名。 #include<stdio.h> main() { printf("计算机\n"); printf("2108\n"); pr
阅读全文

浙公网安备 33010602011771号