摘要:
编写程序,将输入的分数mark(0~100)转换为相应的等级(90~100)为A,(80~89)为B,(70~79)为C,(60~69)为D,(0~59)为NO PASS! #include<stdio.h> main() { int mark; printf("输入学生的分数(0-100):\n" 阅读全文
posted @ 2021-10-30 16:15
金袁媛
阅读(41)
评论(0)
推荐(0)
摘要:
1.判断一个数n是正数还是负数 #include<stdio.h> main() { float n; printf("请输入一个数"); scanf("%f",&n); if (n>0){ printf("正数\n"); }else if (n==0){ printf("输出的数为0\n"); } 阅读全文
posted @ 2021-10-30 15:47
金袁媛
阅读(22)
评论(0)
推荐(0)
摘要:
1.编写程序,定义两个整型变量,复制并输出。 #include<stdio.h> main() { int a=3; int b=5; printf("%d%d\n",a,b); } 2.编写程序,定义一个双精度变量和一个单精度变量,复制并输出。 #include<stdio.h> main() { 阅读全文
posted @ 2021-10-30 13:23
金袁媛
阅读(27)
评论(0)
推荐(0)
浙公网安备 33010602011771号