摘要: #include <ctype.h> int main() { FILE *file; int line_count = 0; int char_count = 0; int ch; int in_line = 0; file = fopen("data4.txt", "r"); if (file 阅读全文
posted @ 2025-06-05 08:12 张鹏飞1 阅读(23) 评论(0) 推荐(0)
摘要: task4 #include <stdio.h> #include<stdlib.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double s 阅读全文
posted @ 2025-06-03 10:07 张鹏飞1 阅读(10) 评论(0) 推荐(0)
摘要: #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, int *pmax); int m 阅读全文
posted @ 2025-05-16 15:54 张鹏飞1 阅读(18) 评论(0) 推荐(0)
摘要: #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", sizeof(x)); // 输 阅读全文
posted @ 2025-04-20 22:51 张鹏飞1 阅读(10) 评论(0) 推荐(0)
摘要: #include <stdio.h> char score_to_grade(int score); // 函数声明 int main() { int score; char grade; while(scanf("%d", &score) != EOF) { grade = score_to_gr 阅读全文
posted @ 2025-04-08 13:13 张鹏飞1 阅读(14) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int number; int i; srand(time(0)); for(i = 0; i < N; ++i) { number 阅读全文
posted @ 2025-03-23 22:18 张鹏飞1 阅读(16) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); printf(" O \n"); printf("<H>\n"); printf("I I\n"); return 0;} #incl 阅读全文
posted @ 2025-03-09 14:59 张鹏飞1 阅读(23) 评论(0) 推荐(0)