摘要: 实验3 屏幕上正确输出了按分数由高到低排序的信息,生成了文本文件file3.dat File3.dat里面的数据信息正确,且直观可读 实验4 子任务1:屏幕上正确输出了按分数由高到低排序的学生信息。生成了二进制文件file4,里面的数据不直观可读 子任务2: #include<stdio.h> #i 阅读全文
posted @ 2020-12-29 11:59 阿周飞 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 实验1#include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 typedef struct student { int id; /*学生学号 */ char name[20]; /*学生姓名 */ char subjec 阅读全文
posted @ 2020-12-20 22:47 阿周飞 阅读(23) 评论(1) 推荐(0) 编辑
摘要: 实验1 #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", & 阅读全文
posted @ 2020-12-14 20:27 阿周飞 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 实验1 返回值只有一个,但是根有两个,所以不能 实验2 #include <stdio.h> long long fac(int n); int main() { int i,n; printf("Enter n: "); scanf("%d", &n); for(i=1; i<=n; ++i) p 阅读全文
posted @ 2020-11-29 11:21 阿周飞 阅读(49) 评论(2) 推荐(0) 编辑
摘要: 实验1#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-16 10:24 阿周飞 阅读(83) 评论(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= 阅读全文
posted @ 2020-11-01 10:07 阿周飞 阅读(84) 评论(0) 推荐(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:25 阿周飞 阅读(42) 评论(1) 推荐(0) 编辑