摘要: 任务4 #include<stdio.h> #define N 100 int main(){ FILE *fp; char a[N]; int i=0,n,m=0,k=0; fp=fopen("data4.txt","r"); if(fp==NULL){ printf("无法打开文件"); ret 阅读全文
posted @ 2026-06-28 20:34 \W/ 阅读(8) 评论(0) 推荐(0)
摘要: 任务4 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 int 阅读全文
posted @ 2026-06-28 20:34 \W/ 阅读(4) 评论(0) 推荐(0)
摘要: 任务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 *pmax); i 阅读全文
posted @ 2026-06-28 20:34 \W/ 阅读(2) 评论(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)=%\n",sizeof(x)); for (i=0;i<N;++i) printf("%p 阅读全文
posted @ 2026-06-28 20:34 \W/ 阅读(3) 评论(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 @ 2026-06-28 19:46 \W/ 阅读(7) 评论(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 阅读全文
posted @ 2026-06-28 19:41 \W/ 阅读(7) 评论(0) 推荐(0)
摘要: 实验任务1 #include <stdio.h> int main() { printf(" O 0\n"); printf("<H><H>\n"); printf("I II I\n"); system("pause"); return 0; #include<stdio.h> #include< 阅读全文
posted @ 2026-03-23 09:06 \W/ 阅读(7) 评论(0) 推荐(0)