摘要: 实验任务三:在屏幕上正确输出了按分数由高到低排序的信息,生成文本文件file3.dat 用记事本程序打开文件file3.dat,里面的数据信息是正确的,直观可读。 实验任务四:里面的数据信息不是直观可读的。 #include<stdio.h> #include<stdlib.h> #define N 阅读全文
posted @ 2021-01-01 13:29 殷富宇 阅读(48) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 10 // 运行程序输入测试时,可以把N改小一些输入测试 typedef struct student { int id; /*学生学号 */ char name[20 阅读全文
posted @ 2020-12-25 15:17 殷富宇 阅读(35) 评论(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-17 13:41 殷富宇 阅读(69) 评论(0) 推荐(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("%lf%lf%lf",& 阅读全文
posted @ 2020-12-06 11:36 殷富宇 阅读(87) 评论(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,&b,&c)!=EOF){ 阅读全文
posted @ 2020-11-18 22:17 殷富宇 阅读(158) 评论(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; } 对应的数学计算式都是ac相乘除以b,计算结果 阅读全文
posted @ 2020-11-05 22:40 殷富宇 阅读(69) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main (){ printf("my stuno is :202083450099\n" "2020,中国百年未有之大变局"); return 0; } #include <stdio.h> int main(){ while(1) printf("1 阅读全文
posted @ 2020-10-18 16:53 殷富宇 阅读(88) 评论(0) 推荐(0) 编辑