摘要: 实验任务4 1 #include <stdio.h> 2 3 int main() { 4 FILE *fp = fopen("data4.txt", "r"); 5 if (!fp) { 6 printf("无法打开文件\n"); 7 return 1; 8 } 9 10 int l=0, c=0 阅读全文
posted @ 2025-12-28 13:48 楊yyy 阅读(9) 评论(1) 推荐(0)
摘要: 实验任务4 1 #include <stdio.h> 2 #include <stdlib.h> 3 #define N 10 4 5 typedef struct { 6 char isbn[20]; 7 char name[80]; 8 char author[80]; 9 double sal 阅读全文
posted @ 2025-12-20 21:05 楊yyy 阅读(9) 评论(1) 推荐(0)
摘要: 任务1 task1.1 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 阅读全文
posted @ 2025-12-09 13:40 楊yyy 阅读(10) 评论(1) 推荐(0)
摘要: 实验任务1 1 #include <stdio.h> 2 #define N 4 3 #define M 2 4 5 void test1() { 6 int x[N] = {1, 9, 8, 4}; 7 int i; 8 9 // 输出数组x占用的内存字节数 10 printf("sizeof(x 阅读全文
posted @ 2025-11-11 14:49 楊yyy 阅读(10) 评论(1) 推荐(0)
摘要: 实验任务1: 1 #include <stdio.h> 2 char score_to_grade(int score); 3 4 int main() { 5 int score; 6 char grade; 7 while(scanf("%d", &score) != EOF) { 8 grad 阅读全文
posted @ 2025-10-24 22:35 楊yyy 阅读(13) 评论(1) 推荐(0)
摘要: 实验任务1 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 5 #define N 5 6 #define N1 80 7 #define N2 35 8 9 int main(){ 10 int cnt; 11 int r 阅读全文
posted @ 2025-10-14 13:26 楊yyy 阅读(12) 评论(1) 推荐(0)
摘要: 任务1 1 #include<stdio.h> 2 int main(){ 3 printf(" 0 \n"); 4 printf("<H>\n"); 5 printf("I I\n"); 6 7 return 0; 8 } 1.1c 1 #include <stdio.h> 2 int main( 阅读全文
posted @ 2025-09-26 21:22 楊yyy 阅读(8) 评论(1) 推荐(0)