摘要: t4 1 #include <stdio.h> 2 #define N 10 3 4 typedef struct{ 5 char isbn[20]; 6 char name[80]; 7 char author[80]; 8 double sales_price; 9 int sales_coun 阅读全文
posted @ 2025-06-07 23:03 diaojiayi 阅读(4) 评论(0) 推荐(0)
摘要: t1 1 // 文件读写操作:格式化读、写文本文件 2 #include <stdio.h> 3 4 #define N 80 5 #define M 100 6 7 typedef struct { 8 char name[N]; // 书名 9 char author[N]; // 作者 10 阅读全文
posted @ 2025-06-07 21:28 diaojiayi 阅读(20) 评论(0) 推荐(0)
摘要: task1.1 1 #include <stdio.h> 2 #define N 5 3 4 void input(int x[], int n); 5 void output(int x[], int n); 6 void find_min_max(int x[], int n, int *pmi 阅读全文
posted @ 2025-05-18 17:43 diaojiayi 阅读(22) 评论(0) 推荐(0)
摘要: t1 1 #include <stdio.h> 2 #define N 4 3 #define M 2 4 5 void test1() { 6 int x[N] = {1, 9, 8, 4}; 7 int i; 8 9 // 输出数组x占用的内存字节数 10 printf("sizeof(x) = 阅读全文
posted @ 2025-04-20 17:40 diaojiayi 阅读(15) 评论(0) 推荐(0)
摘要: TASK1 1 #include <stdio.h> 2 3 char score_to_grade(int score); // 函数声明 4 5 int main() { 6 int score; 7 char grade; 8 9 while(scanf("%d", &score) != EO 阅读全文
posted @ 2025-04-04 15:15 diaojiayi 阅读(27) 评论(0) 推荐(0)
摘要: TASK1 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 5 #define N 5 6 7 int main() { 8 int number; 9 int i; 10 11 srand(time(0)); // 阅读全文
posted @ 2025-03-22 17:28 diaojiayi 阅读(15) 评论(0) 推荐(0)
摘要: TASK1.1 1 #include <stdio.h> 2 3 #include <stdlib.h> 4 5 int main() 6 { 7 printf(" o \n"); 8 printf("<H>\n"); 9 printf("I I\n"); 10 11 printf(" o \n") 阅读全文
posted @ 2025-03-09 20:07 diaojiayi 阅读(22) 评论(0) 推荐(0)