摘要: 实验任务1、实验任务2 略 实验任务3:屏幕正确出现了信息,生成了file3.dat,内容正确,直观可读。 实验任务4: 子任务1:屏幕正确输出信息,生成文件file4.dat,不直观可读。 子任务2: #include <stdio.h> #include <stdlib.h> #define N 阅读全文
posted @ 2020-12-24 15:15 GHao831 阅读(89) 评论(2) 推荐(0) 编辑
摘要: #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 5 typedef struct student { int id; char name[20]; char subject[20]; float perf; floa 阅读全文
posted @ 2020-12-16 13:24 GHao831 阅读(43) 评论(4) 推荐(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] 阅读全文
posted @ 2020-12-07 22:04 GHao831 阅读(88) 评论(4) 推荐(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-11-25 15:55 GHao831 阅读(59) 评论(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", &a, 阅读全文
posted @ 2020-11-11 18:05 GHao831 阅读(103) 评论(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; } line6:5 阅读全文
posted @ 2020-10-29 22:21 GHao831 阅读(78) 评论(1) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { printf("我的学号是:2020.。。。。\n"); printf("老师最美\n"); return 0; } #include <stdio.h> int main() { int x, y; int r1, r2, r3, r 阅读全文
posted @ 2020-10-16 20:38 GHao831 阅读(58) 评论(0) 推荐(0) 编辑