摘要: 任务四 #include <stdio.h> int main() { FILE *fp; char ch; int line = 0, charNum = 0; int flag = 0; fp = fopen("data4.txt","r"); if(fp == NULL) { printf(" 阅读全文
posted @ 2026-06-23 20:37 派大睿 阅读(1) 评论(0) 推荐(0)
摘要: 任务四 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; char name[100]; char author[80]; double sales_price; int sales_count; } Book; void 阅读全文
posted @ 2026-06-16 20:50 派大睿 阅读(4) 评论(0) 推荐(0)
摘要: 实验一 #include <stdio.h> #define N 5 void input(int x[], int n); void output(int x[], int n); int *find_max(int x[], int n); int main() { int a[N]; int 阅读全文
posted @ 2026-06-03 00:53 派大睿 阅读(7) 评论(0) 推荐(0)
摘要: 任务1 #include <stdio.h> #define N 4 #define M 2 void test1() { int x[N] = {1, 9, 8, 4}; int i; printf("sizeof(x) = %zu\n", sizeof(x)); for (i = 0; i < 阅读全文
posted @ 2026-05-04 21:25 派大睿 阅读(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_grade( 阅读全文
posted @ 2026-04-22 00:00 派大睿 阅读(5) 评论(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 < 阅读全文
posted @ 2026-04-07 21:28 派大睿 阅读(7) 评论(0) 推荐(0)
摘要: 实验一 task1 1.c 1 //打印一个字符小人 2 #include<stdio.h> 3 #include<stdlib.h> 4 int main() 5 { 6 printf(" o \n"); 7 printf("<H>\n"); 8 printf("I I\n"); 9 printf 阅读全文
posted @ 2026-03-22 16:50 派大睿 阅读(7) 评论(0) 推荐(0)