摘要: 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-05 21:07 BurnedFlazer 阅读(34) 评论(0) 推荐(0)
摘要: task4.c: #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售 阅读全文
posted @ 2025-05-29 15:20 BurnedFlazer 阅读(21) 评论(0) 推荐(0)
摘要: 任务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 *pmin, i 阅读全文
posted @ 2025-05-15 19:25 BurnedFlazer 阅读(34) 评论(0) 推荐(0)
摘要: 任务1: #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-17 23:47 BurnedFlazer 阅读(26) 评论(0) 推荐(0)
摘要: 任务1: #include <stdio.h> char score_to_grade(int score); int main() { int score; char grade; while(scanf("%d", &score) != EOF) { grade = score_to_grade 阅读全文
posted @ 2025-04-08 14:01 BurnedFlazer 阅读(19) 评论(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; 阅读全文
posted @ 2025-03-20 15:22 BurnedFlazer 阅读(22) 评论(0) 推荐(0)
摘要: task1_1.c: #include <stdio.h> #include <stdlib.h> int main() { int i; for(i=1;i<=2;i++) { printf(" O \n<H>\nI I\n"); } system("pause"); return 0; } Vi 阅读全文
posted @ 2025-03-05 20:56 BurnedFlazer 阅读(29) 评论(0) 推荐(0)