摘要: 教材52页4-8分数转成等级switch #include<stdio.h> main() { int mark; printf("请输入学生的分数(0-100:\n"); scanf("%d",&mark); switch(mark/10) { case 10: //与case9:共用同一条语句 阅读全文
posted @ 2021-11-01 13:08 杨阿浩 阅读(29) 评论(0) 推荐(0)
摘要: 1.编写程序判断n是正数还是负数。 #include<stdio.h> main() { int n; printf("输入一个整数:\n"); scanf("%d",&n); if (n>0) printf("%d是正数!\n",n); else if(n==0) printf("%d既不是正数, 阅读全文
posted @ 2021-11-01 12:57 杨阿浩 阅读(18) 评论(0) 推荐(0)
摘要: 1.教材52页4-8分数转成等级switch #include<stdio.h> main() { int mark; printf("请输入学生的分数(0-100:\n"); scanf("%d",&mark); switch(mark/10) { case 10: //与case9:共用同一条语 阅读全文
posted @ 2021-11-01 12:55 杨阿浩 阅读(33) 评论(0) 推荐(0)