摘要: // 文件读写操作:格式化读、写文本文件 #include <stdio.h> #define N 80 #define M 100 typedef struct { char name[N]; // 书名 char author[N]; // 作者 } Book; void write(); vo 阅读全文
posted @ 2024-12-30 20:25 朱宁苇 阅读(8) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #define N 2 typedef struct student { int id; char name[20]; char subject[20]; double perf; double mid; double f 阅读全文
posted @ 2024-12-22 21:07 朱宁苇 阅读(15) 评论(0) 推荐(0)
摘要: #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); int main(){ i 阅读全文
posted @ 2024-12-08 22:09 朱宁苇 阅读(12) 评论(0) 推荐(0)
摘要: #include<stdio.h> #define N 4 #define M 2 void test1(){ int x[N]={1,9,8,4}; int i; printf("sizeof(x)=%d\n",sizeof(x)); for(i=0;i<N;++i) printf("%p:%d\ 阅读全文
posted @ 2024-11-10 22:54 朱宁苇 阅读(5) 评论(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(scor 阅读全文
posted @ 2024-10-27 20:05 朱宁苇 阅读(27) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define N1 397 #define N2 476 #define N3 21 int main() { int cnt; int random_majo 阅读全文
posted @ 2024-10-14 09:37 朱宁苇 阅读(21) 评论(0) 推荐(0)
摘要: 任务一 1.1源代码 #include<stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); return 0; } task1_1.c #include<stdio.h> int main() { prin 阅读全文
posted @ 2024-09-28 22:32 朱宁苇 阅读(8) 评论(0) 推荐(0)