摘要: 实验7 实验任务4 task4.c 代码: #include <stdio.h> #define N 100 int main() { int lines = 0; int chars = 0; int i,j; char info[N][N]; FILE* fp; fp = fopen("d:\\ 阅读全文
posted @ 2025-06-04 21:45 Bloon682 阅读(30) 评论(0) 推荐(0)
摘要: 实验6 实验任务4 task4.c 代码: #include <stdio.h> #include <stdlib.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80 阅读全文
posted @ 2025-05-28 12:51 Bloon682 阅读(24) 评论(0) 推荐(0)
摘要: 实验5 实验任务1: task1_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 阅读全文
posted @ 2025-05-16 20:10 Bloon682 阅读(21) 评论(0) 推荐(0)
摘要: 实验4 实验任务1 task1.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) = 阅读全文
posted @ 2025-04-15 14:02 Bloon682 阅读(27) 评论(0) 推荐(0)
摘要: 实验3 实验任务1 task1.c 代码: #include <stdio.h> #include <stdlib.h> char score_to_grade(int score); // 函数声明 int main() { int score; char grade; while (scanf( 阅读全文
posted @ 2025-04-03 15:34 Bloon682 阅读(50) 评论(0) 推荐(0)
摘要: 实验2 实验任务1 task1.c 代码: #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int number; int i; srand(time(0)); // 以当前系统时间作 阅读全文
posted @ 2025-03-18 15:02 Bloon682 阅读(31) 评论(0) 推荐(0)
摘要: 实验任务一: task1_1.c: 代码: 1 #include <stdio.h> 2 int main() 3 { 4 printf(" o \n"); 5 printf("<H>\n"); 6 printf("I I\n"); 7 8 printf(" o \n"); 9 printf("<H 阅读全文
posted @ 2025-03-04 20:44 Bloon682 阅读(32) 评论(0) 推荐(0)