摘要:
任务三 1屏幕上出现了按分数由高到底排序的信息 2.生成了file3.dat 3。file3.dat里面的数据信息正确,且直观可读 任务四 子任务一 1.在屏幕上正确输出了按分数由高到底排序的学生信息 2.在当前路径下生成了二进制文件file4.dat 3信息不直观可读,里面的数据是乱码 子任务二 阅读全文
摘要:
任务一 #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 阅读全文
摘要:
任务一 #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\ 阅读全文
摘要:
任务一 #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 阅读全文
摘要:
#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, 阅读全文
摘要:
任务一: #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, 阅读全文
摘要:
任务三 #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 阅读全文