摘要: 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)) != 阅读全文
posted @ 2025-06-08 18:04 也喜欢猫吗 阅读(1) 评论(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:59 也喜欢猫吗 阅读(3) 评论(0) 推荐(0)
摘要: task 1_1 查看代码 #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 阅读全文
posted @ 2025-05-17 19:58 也喜欢猫吗 阅读(6) 评论(0) 推荐(0)
摘要: task1 查看代码 #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", sizeo 阅读全文
posted @ 2025-04-21 10:21 也喜欢猫吗 阅读(2) 评论(0) 推荐(0)
摘要: T1 #include <stdio.h> char score_to_grade(int score); int main() { int score; char grade; while(scanf("%d", &score) != EOF) { grade = score_to_grade(s 阅读全文
posted @ 2025-04-09 23:15 也喜欢猫吗 阅读(1) 评论(0) 推荐(0)
摘要: #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 19:32 也喜欢猫吗 阅读(3) 评论(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; } `#in 阅读全文
posted @ 2025-03-10 11:03 也喜欢猫吗 阅读(33) 评论(0) 推荐(0)