10 2021 档案
摘要: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",n
阅读全文
摘要:1.4-8 使用switch-case语句将分数分级。 #include <stdio.h> main() { int mark; printf("请输入分数"); scanf("%d",&mark); switch(mark/10) { case 10: case 9:printf("A\n");
阅读全文
摘要:1.编写程序 ,判断一个数n是正数还是负数。 #include< stdio.h> main() { float n; scanf("%f",&n); if(n>0) printf("正数!\n"); else if(n==0) printf("0既不是正数,也不是负数!\n"); else pri
阅读全文
摘要:1 #include<stdio.h> main() { int a; float b; double c; char d; scanf("%d\n%f\n%lf\n%c",&a,&b,&c,&d); printf("%d\n%f\n%lf\n%f",a,b,c,d); } 2 #include<s
阅读全文
摘要:编写程序,定义两个整形变量,赋值并输出 #include<stdio.h> main() { int a=5; int b=7; printf("%d %d\n",a,b); } 2.编写程序,定义一个单精度和一个双精度的变量,赋值并输出。 #include<stdio.h> main() { fl
阅读全文
摘要:1.编写程序输出“我爱C语言!” #include< stdio.h > main() { printf("我爱学习C语言!"); } 2.分行输出自己的专业和姓名。 #include< stdio.h > main() { printf("计算机科学与技术\n 王琪涵\n"); } 3.用*输出字
阅读全文
浙公网安备 33010602011771号