摘要: 实验四 #include <stdio.h> #include <stdlib.h> #define N 10 typedef struct student { int num; char name[20]; int score; }STU; int main() { FILE *fin; STU 阅读全文
posted @ 2020-12-31 12:51 忘川彼岸的行者 阅读(60) 评论(0) 推荐(0)
摘要: 实验1 #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 4 typedef struct student { int id; char name[20]; char subject[20]; float perf; 阅读全文
posted @ 2020-12-23 17:26 忘川彼岸的行者 阅读(78) 评论(0) 推荐(0)
摘要: 实验1 #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", & 阅读全文
posted @ 2020-12-16 15:08 忘川彼岸的行者 阅读(74) 评论(0) 推荐(0)
摘要: 实验1 // 一元二次方程求解 (函数实现方式) // 重复执行, 直到按Ctrl+Z结束 #include <math.h> #include <stdio.h> // 函数声明 void solve(double a, double b, double c); // 主函数 int main() 阅读全文
posted @ 2020-11-26 20:28 忘川彼岸的行者 阅读(78) 评论(0) 推荐(0)
摘要: 实验1 #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", 阅读全文
posted @ 2020-11-17 12:31 忘川彼岸的行者 阅读(85) 评论(0) 推荐(0)
摘要: 实验一 /*A simple C program*/ #include<stdio.h> int main(){ printf("hello.c\n"); return 0; } 实验二 /*循环打印字符*/ #include<stdio.h> int main(){ while(1) printf 阅读全文
posted @ 2020-10-15 19:58 忘川彼岸的行者 阅读(96) 评论(0) 推荐(0)