摘要: task4.c #include<stdio.h> int main(){ FILE *fp; char ch; int lines=0, chars=0; int blank=0; fp = fopen("data4.txt","r"); while((ch = fgetc(fp)) != EOF 阅读全文
posted @ 2025-06-08 18:07 不加香菜不加辣 阅读(14) 评论(0) 推荐(0)
摘要: task4 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 i 阅读全文
posted @ 2025-06-01 20:54 不加香菜不加辣 阅读(18) 评论(0) 推荐(0)
摘要: task1-1 #include <stdio.h> #include <stdlib.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(int x[], int n, 阅读全文
posted @ 2025-05-18 23:10 不加香菜不加辣 阅读(12) 评论(0) 推荐(0)
摘要: task1 #include <stdio.h> #include <stdlib.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-21 10:48 不加香菜不加辣 阅读(18) 评论(0) 推荐(0)
摘要: 实验3 task1 #include <stdio.h> char score_to_grade(int score); // 函数声明 int main() { int score; char grade; while(scanf("%d", &score) != EOF) { grade = s 阅读全文
posted @ 2025-04-09 23:45 不加香菜不加辣 阅读(21) 评论(0) 推荐(0)
摘要: task1 #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) { nu 阅读全文
posted @ 2025-03-23 20:17 不加香菜不加辣 阅读(15) 评论(0) 推荐(0)
摘要: task1 #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; 阅读全文
posted @ 2025-03-09 23:45 不加香菜不加辣 阅读(20) 评论(0) 推荐(0)