摘要: 任务三:屏幕上输出了分数从高到低的排序,同时生成了文本文件file3.dat 任务四:子任务1 屏幕上输出了按照分数从高到低的学生信息,生成了二进制文件file4.dat,不直观可读。 子任务2 #include <stdio.h> #include <stdlib.h> #define N 10 阅读全文
posted @ 2020-12-31 23:00 来瓶纯牛奶 阅读(56) 评论(1) 推荐(0) 编辑
摘要: #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 typedef struct student{ int id; char name[20]; char subject[20]; float perf; float 阅读全文
posted @ 2020-12-24 23:26 来瓶纯牛奶 阅读(62) 评论(1) 推荐(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 23:26 来瓶纯牛奶 阅读(50) 评论(2) 推荐(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",&a 阅读全文
posted @ 2020-12-03 20:09 来瓶纯牛奶 阅读(82) 评论(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,&c)!=EOF){ 阅读全文
posted @ 2020-11-20 00:33 来瓶纯牛奶 阅读(71) 评论(1) 推荐(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,e,f都为整型变量,在运算中会 阅读全文
posted @ 2020-11-01 20:12 来瓶纯牛奶 阅读(101) 评论(2) 推荐(0) 编辑
摘要: #include<stdio.h> int main(){ printf("my stuno is:202083450028\n"); printf("2020,不平凡的一年"); return 0; } /*循环字符打印*/ #include<stdio.h> int main(){ while( 阅读全文
posted @ 2020-10-18 17:37 来瓶纯牛奶 阅读(56) 评论(0) 推荐(0) 编辑