摘要: 实验任务4 test4.c #include<stdio.h> int main(){ FILE * fp; int line = 0, s = 0; char ch[1000]; char c; fp = fopen("data4.txt", "r"); if (!fp) { perror("fa 阅读全文
posted @ 2025-12-30 22:31 thirin 阅读(5) 评论(1) 推荐(0)
摘要: 实验任务1 test1.c #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把N改小一些输入测试 typedef struct student { int id; // 学号 char name[20]; // 姓名 阅读全文
posted @ 2025-12-22 20:08 thirin 阅读(7) 评论(1) 推荐(0)
摘要: 实验任务1 test1_1.c #include <stdio.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(int x[], int n, int *pmin, i 阅读全文
posted @ 2025-12-06 12:28 thirin 阅读(10) 评论(1) 推荐(0)
摘要: 实验任务1 test1.c #include <stdio.h> #define N 4 #define M 2 void test1() { int x[N] = { 1, 9, 8, 4 }; int i; // 输出数组x占用的内存字节数 printf("sizeof(x) = %d\n", 阅读全文
posted @ 2025-11-16 21:50 thirin 阅读(7) 评论(1) 推荐(0)
摘要: 实验任务1 test1.c #include <stdio.h> char score_to_grade(int score); //函数声明 int main() { int score; char grade; while (scanf("%d", &score) != EOF) { grade 阅读全文
posted @ 2025-10-24 21:33 thirin 阅读(11) 评论(1) 推荐(0)
摘要: 实验任务1 test1.c源代码 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define N1 80 #define N2 35 int main() { int cnt; int random_maj 阅读全文
posted @ 2025-10-16 21:12 thirin 阅读(10) 评论(1) 推荐(0)
摘要: 实验任务1 task1.c源代码 #include<stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); return 0; } 运行结果截图 task1_1.c源代码 #include<stdio.h> i 阅读全文
posted @ 2025-10-08 21:07 thirin 阅读(12) 评论(1) 推荐(0)