10 2021 档案

摘要:分数转成等级 switch #include<stdio.h> main() { int a; printf("请输入学生的分数(0-100):\n"); scanf("%d",&a); switch(a/10) { case 10: case 9:printf("A\n");break; case 阅读全文
posted @ 2021-10-30 14:38 云鹤銐 阅读(31) 评论(0) 推荐(0)
摘要:判断一个数n是正数还是负数 #include<stdio.h> main() { float n; scanf("%f",&n); if(n>0) printf("正数!\n"); else if(n==0) printf("0既不是正数,也不是负数!\n"); else printf("负数\n" 阅读全文
posted @ 2021-10-24 14:09 云鹤銐 阅读(40) 评论(0) 推荐(0)
摘要:#include<stdio.h> main() { int a=1; int b=2; printf("%d\n%d\n",a,b); } #include<stdio.h> main() { float a=1.23; double b=4.56; printf("%f\n%f\n",a,b); 阅读全文
posted @ 2021-10-12 10:52 云鹤銐 阅读(55) 评论(0) 推荐(0)
摘要:#include<stdio.h> main() { printf("赵成瑞\n"); } #include<stdio.h> main() { printf("我爱学C语言\n"); printf("计算机科学与技术\n"); printf(" ***\n"); printf("*\n"); pr 阅读全文
posted @ 2021-10-01 16:58 云鹤銐 阅读(19) 评论(0) 推荐(0)