10 2021 档案

摘要:1、编写程序,输入一个分数(0——100分)并评出相应等级。 #include<stdio.h> main(){ int mark; printf("请输入学生的分数(0——100)\n"); scanf("%d",&mark); switch(mark/10) { case 10: case 9: 阅读全文
posted @ 2021-10-26 10:59 问世间什么最美丽 阅读(57) 评论(0) 推荐(0)
摘要:1、编写程序,使用scanf()函数接受整型、实型、字符型的变量,并分行依次输出。 #include<stdio.h> main(){ int a; float b; char c; scanf("%d,%f,%c",&a,&b,&c); printf("%d--%f--%c\n",a,b,c); 阅读全文
posted @ 2021-10-16 21:53 问世间什么最美丽 阅读(47) 评论(0) 推荐(0)
摘要:编写程序,定义两个整型变量,赋值并输出。 #include<stdio.h> main() { int a=3; int b=9; printf("%d%d\n",a,b); } 编写程序,定义一个单精度和一个双精度的变量。 #include<stdio.h> main() { float m=3. 阅读全文
posted @ 2021-10-13 21:10 问世间什么最美丽 阅读(13) 评论(0) 推荐(0)