摘要: task4.c 1 #include <stdio.h> 2 3 int main() 4 { 5 FILE *fp; 6 int ch; 7 int line = 0; 8 int char_cnt = 0; 9 int has_content = 0; 10 11 fp = fopen("dat 阅读全文
posted @ 2026-06-22 22:37 禾言1108 阅读(12) 评论(0) 推荐(0)
摘要: task1.c 1 #include <stdio.h> 2 #include <string.h> 3 #define N 3 // 运行程序输入测试时,可以把N改小一些输入测试 4 5 typedef struct student { 6 int id; // 学号 7 char name[20 阅读全文
posted @ 2026-06-15 17:35 禾言1108 阅读(7) 评论(0) 推荐(0)
摘要: task1-1.c 1 #include <stdio.h> 2 #define N 5 3 4 void input(int x[], int n); 5 void output(int x[], int n); 6 void find_min_max(int x[], int n, int *p 阅读全文
posted @ 2026-06-01 15:46 禾言1108 阅读(9) 评论(0) 推荐(0)
摘要: task1.c 1 #include <stdio.h> 2 #define N 100 3 // 函数声明 4 void input(int x[][N], int n); 5 void output(int x[][N], int n); 6 int is_magic(int x[][N], i 阅读全文
posted @ 2026-05-05 17:58 禾言1108 阅读(14) 评论(0) 推荐(0)
摘要: task1.c 1 #include<stdio.h> 2 char score_to_grade(int score); 3 4 int main() { 5 int score; 6 char grade; 7 8 while(scanf("%d",&score)!=EOF){ 9 grade 阅读全文
posted @ 2026-04-21 21:57 禾言1108 阅读(8) 评论(0) 推荐(0)
摘要: task1.c 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 5 #define N 5 6 7 int main(){ 8 int number; 9 int i; 10 11 srand(time(0)); 12 fo 阅读全文
posted @ 2026-04-06 22:02 禾言1108 阅读(6) 评论(0) 推荐(0)
摘要: 实验任务1 task1_1.c 1 // 打印一个字符小人 2 3 #include<stdio.h> 4 int main() 5 { 6 printf(" o \n"); 7 printf("<H>\n"); 8 printf("I I\n"); 9 10 return 0; 11 } task 阅读全文
posted @ 2026-03-22 17:42 禾言1108 阅读(8) 评论(0) 推荐(0)