摘要: // 从文本数据文件file1.dat中读入数据,按成绩从高到低排序,并将排序结果输出到屏幕上,同时,也以二进制方式存入文件file4.dat中。 #include <stdio.h> #include <stdlib.h> #define N 10 // 定义一个结构体类型STU typedef 阅读全文
posted @ 2020-12-31 13:22 华征 阅读(36) 评论(2) 推荐(0) 编辑
摘要: #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 2 typedef struct student { int id; char name[20]; char subject[20]; float perf; floa 阅读全文
posted @ 2020-12-24 12:18 华征 阅读(44) 评论(2) 推荐(0) 编辑
摘要: // 一元二次方程求解(函数实现方式) // 重复执行, 直到按下Ctrl+Z结束 #include <math.h> #include <stdio.h> // 函数声明 void solve(double a, double b, double c); // 主函数 int main() { d 阅读全文
posted @ 2020-12-02 23:53 华征 阅读(61) 评论(3) 推荐(0) 编辑
摘要: //一元二次方程求解 //重复执行,直到按Ctrl+Z结束 // #include<stdio.h> #include<math.h> int main(){ float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: 阅读全文
posted @ 2020-11-19 00:08 华征 阅读(62) 评论(2) 推荐(0) 编辑
摘要: // ex1.cpp #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; } //e 阅读全文
posted @ 2020-11-05 13:05 华征 阅读(54) 评论(3) 推荐(0) 编辑
摘要: /* A simple C program */ #include <stdio.h> int main() { printf("my stuno is 202083290264\n"); printf("2020 I am coming.\n"); return 0; } /* 循环打印字符 */ 阅读全文
posted @ 2020-10-18 22:28 华征 阅读(34) 评论(2) 推荐(0) 编辑