摘要: 点击查看代码 #include <stdio.h> int main() { int count = 0; int ch; FILE *fp; fp = fopen("data4.txt", "r"); if (fp == NULL) { printf("fail to open file\n"); 阅读全文
posted @ 2024-06-20 21:18 星軌xx 阅读(36) 评论(0) 推荐(0)
摘要: 点击查看代码 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 阅读全文
posted @ 2024-06-10 17:36 星軌xx 阅读(21) 评论(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, int *p 阅读全文
posted @ 2024-05-23 16:30 星軌xx 阅读(17) 评论(0) 推荐(0)
摘要: 1 点击查看代码 #include <stdio.h> #define N 4 void test1() { int a[N] = {1, 9, 8, 4}; int i; printf("sizeof(a) = %d\n", sizeof(a)); for (i = 0; i < N; ++i) 阅读全文
posted @ 2024-05-19 21:00 星軌xx 阅读(15) 评论(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-23 17:06 星軌xx 阅读(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 = 阅读全文
posted @ 2024-04-10 21:48 星軌xx 阅读(7) 评论(0) 推荐(0)
摘要: 点击查看代码 #include <stdio.h> #include <stdlib.h> int main(){ printf(" o o \n"); printf("<H> <H>\n"); printf("I I I I\n"); system("pause"); return 0; } 点击 阅读全文
posted @ 2024-03-17 22:38 星軌xx 阅读(10) 评论(0) 推荐(0)