摘要: task1. 点击查看代码 // 将图书信息写入文本文件data1.txt // 再从文件中读取图书信息,打印输出到屏幕上,并显示行号 #include <stdio.h> #define N 80 #define M 100 typedef struct { char name[N]; // 书名 阅读全文
posted @ 2024-06-23 20:30 王皓| 阅读(24) 评论(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) 阅读全文
posted @ 2024-05-27 12:24 王皓| 阅读(18) 评论(0) 推荐(0)
摘要: 点击查看代码 #include <stdio.h> #define N 4 void test1() { int a[N] = {1, 9, 8, 4}; int i; // 输出数组a占用的内存字节数 printf("sizeof(a) = %d\n", sizeof(a)); // 输出int类 阅读全文
posted @ 2024-05-19 23:08 王皓| 阅读(19) 评论(0) 推荐(0)
摘要: 点击查看代码 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> #define N 80 void print_text(int line, int col, char text[]); // 阅读全文
posted @ 2024-04-30 12:40 王皓| 阅读(12) 评论(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){ numbe 阅读全文
posted @ 2024-04-15 13:06 王皓| 阅读(23) 评论(0) 推荐(0)
摘要: 点击查看代码 #include <stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); return 0; } 2. 点击查看代码 #include <stdio.h> int main() { printf 阅读全文
posted @ 2024-03-17 23:18 王皓| 阅读(21) 评论(0) 推荐(0)