摘要: 任务三 1屏幕上出现了按分数由高到底排序的信息 2.生成了file3.dat 3。file3.dat里面的数据信息正确,且直观可读 任务四 子任务一 1.在屏幕上正确输出了按分数由高到底排序的学生信息 2.在当前路径下生成了二进制文件file4.dat 3信息不直观可读,里面的数据是乱码 子任务二 阅读全文
posted @ 2020-12-31 11:40 7heng 阅读(42) 评论(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]; float perf; f 阅读全文
posted @ 2020-12-20 14:40 7heng 阅读(72) 评论(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\ 阅读全文
posted @ 2020-12-16 14:26 7heng 阅读(46) 评论(3) 推荐(0) 编辑
摘要: 任务一 #include<math.h> #include<stdio.h> void solve(double a, double b, double c); int main() { double a, b, c; printf("Enter a,b,c:"); while (scanf("%l 阅读全文
posted @ 2020-12-03 12:34 7heng 阅读(56) 评论(3) 推荐(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", &a, &b, 阅读全文
posted @ 2020-11-19 22:04 7heng 阅读(62) 评论(2) 推荐(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, 阅读全文
posted @ 2020-11-01 13:32 7heng 阅读(48) 评论(3) 推荐(0) 编辑
摘要: 任务三 #include<stdio.h> int main(){ int x,y; int r1, r2, r3, r4; x = 1; y = 2; r1 = x + y; r2 = x - y; r3 = x * y; r4 = x / y; printf("r1=%d\n", r1); pr 阅读全文
posted @ 2020-10-17 10:33 7heng 阅读(67) 评论(3) 推荐(0) 编辑