摘要: 第六次作业 1.编写程序判断n是整数还是负数。 #include<stdio.h>main(){int n;printf("输入一个整数:\n");scanf("%d",&n);if(n>0)printf("%d是正数!\n",n);elseif(n==0)printf("%d既不是正数,也不是是负数!\n", 阅读全文
posted @ 2021-10-31 12:54 吕洪阳 阅读(32) 评论(0) 推荐(0)
摘要: 第五次作业 1.教材p52 例4-8 分数转成等级 switch #include<stdio.h>main(){int mark;printf("请输入学生的分数(0-100):\n");scanf("%d",&mark);switch(mark/10){case 10:case 9:printf("A\n" 阅读全文
posted @ 2021-10-31 12:44 吕洪阳 阅读(25) 评论(0) 推荐(0)