摘要: 实验任务四 代码 点击查看代码 #include<stdio.h> #include<ctype.h> int main(){ FILE *fp; fp=fopen("data4.txt","r"); if(fp==NULL){ printf("打不开,有问题 \n"); return 1; } i 阅读全文
posted @ 2025-06-09 12:44 任书静 阅读(3) 评论(0) 推荐(0)
摘要: 实验任务四 代码 点击查看代码 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_pric 阅读全文
posted @ 2025-06-03 10:42 任书静 阅读(5) 评论(0) 推荐(0)
摘要: 实验任务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, 阅读全文
posted @ 2025-05-18 23:12 任书静 阅读(4) 评论(0) 推荐(0)
摘要: 实验四 实验任务一 代码 点击查看代码 #include<stdio.h> #include<stdlib.h> #define N 4 #define M 2 void test1(){ int x[N]={1,9,8,4}; int i; printf("sizeof(x)=%d\n",size 阅读全文
posted @ 2025-04-20 20:59 任书静 阅读(7) 评论(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-09 14:04 任书静 阅读(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<N;++i 阅读全文
posted @ 2025-03-23 15:09 任书静 阅读(8) 评论(0) 推荐(0)
摘要: 实验一 实验任务一 代码 点击查看代码 #include<stdio.h> #include<stdlib.h> int main() { printf(" o o\n"); printf("<H> <H>\n"); printf("I I I I\n"); printf(" o \n"); pri 阅读全文
posted @ 2025-03-08 13:02 任书静 阅读(11) 评论(0) 推荐(0)