摘要: 实验三: 1.屏幕上正确输出了按分数由高到低的排序的信息,在当前路径下,生成了文本文件file3.dat 2.file3.dat中的信息正确,并且只直观可读 实验四: 子任务一:正确输出了按分数由高到低排序的学生信息,生成了二进制文件file4.dat,里面的信息不是直观可读的 子任务二: #inc 阅读全文
posted @ 2020-12-31 12:03 秃头mortal 阅读(39) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 typedef struct student{ int id; //学生学号 int name[20]; //学生姓名 char subject[20];//考试科 阅读全文
posted @ 2020-12-21 23:01 秃头mortal 阅读(64) 评论(2) 推荐(0) 编辑
摘要: #include<stdio.h> const int N=3; int main(){ int a[N]={1,2,3}; int i; printf("通过数组名及下标直接访问数组元素:\n"); for(i=0;i<N;i++) printf("%d:%d\n",&a[i],a[i]); pr 阅读全文
posted @ 2020-12-14 18:03 秃头mortal 阅读(29) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<math.h> void solve(double a,double b,double c); int main(){ double a,b,c; printf("Enter a, b, c:"); while(scanf("%lf%lf%lf" 阅读全文
posted @ 2020-11-29 20:13 秃头mortal 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 实验任务一 #include<math.h> #include<stdio.h> int main(){ float a, b, c, x1, x2; float delta, real, imag; printf("Enter a , b, c: "); while(scanf("%f%f%f", 阅读全文
posted @ 2020-11-14 23:49 秃头mortal 阅读(42) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> int main(){ int a=5,b=7,c=100,d,e,f; d=a/b*c; e=a*c/b; f=c/b*a; printf("d=%d,e=%d,f=%d\n",d,e,f); return 0; } 数学计算式:d=5/7*100=0*100= 阅读全文
posted @ 2020-10-31 09:03 秃头mortal 阅读(60) 评论(1) 推荐(0) 编辑
摘要: #include<stdio.h> int main(){ int a=5,b=7,c=100,d,e,f; d=a/b*c; e=a*c/b; f=c/b*a; printf("d=%d,e=%d,f=%d\n",d,e,f); return 0; } #include<stdio.h> int 阅读全文
posted @ 2020-10-29 23:56 秃头mortal 阅读(42) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> int main() { printf("my stuno is:202083450079\n2020fighting"); return 0; } #include<stdio.h> int main() { while(0) printf("0 1"); re 阅读全文
posted @ 2020-10-18 01:17 秃头mortal 阅读(49) 评论(1) 推荐(0) 编辑