10 2021 档案
摘要:1.#include<stdio.h>main(){int mark;printf("请输入学生分数:\n");scanf("%d",&mark);switch(mark/10){case 10:case 9:printf("A\n");break;case 8:printf("B\n");brea
阅读全文
摘要:编写程序,判断一个数n是正数还是负数。 #include<stdio.h> main() { int n; scanf("%d",&n); if(n>0) printf("%d正数\n",n); else printf("%d是负数\n",n); } 2.编写程序,计算出租车的行驶距离与费用之间的关
阅读全文
摘要:1编写程序,使用scanf()函数接收整型,实型,字符型的变量,并分行依次输出。 #include<stdio.h> main() { int a; float b; char d; scanf("%d,%f,%c",&a,&b,&d); printf("%d\n%f\n%c\n",a,b,d);
阅读全文
摘要:1.编写程序,定义两个整型变量,赋值并输出。 #include<stdio.h> main() { int a=3; int b=7; printf("%d%d\n",a,b); } 2.编写程序,定义一个单精度变量和一个双精度变量,赋值并输出。 #include<stdio.h> main() {
阅读全文
摘要:1.编写程序,输出“我爱C语言” #include<stdio.h> main() { printf("我爱学习C语言"); } 2.分行输出自己的专业和姓名 #include<stdio.h> main() { printf("计算机2107\n"); printf("李楠"); } 3.用*输出
阅读全文
浙公网安备 33010602011771号