摘要: task4 点击查看代码 #include <stdio.h> int main() { FILE *file; char ch; int num = 0; // 打开文件 file = fopen("data4.txt", "r"); if (file == NULL) { printf("无法打 阅读全文
posted @ 2024-06-23 00:54 Cardi 阅读(21) 评论(0) 推荐(0)
摘要: task4 点击查看代码 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; 阅读全文
posted @ 2024-06-08 23:43 Cardi 阅读(36) 评论(0) 推荐(0)
摘要: task1.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, in 阅读全文
posted @ 2024-05-25 17:56 Cardi 阅读(19) 评论(0) 推荐(0)
摘要: task1.1 点击查看代码 #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)); / 阅读全文
posted @ 2024-05-19 14:41 Cardi 阅读(46) 评论(0) 推荐(0)
摘要: task1 点击查看代码 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <unistd.h> #define N 80 void print_text(int line, int col, char text[]) 阅读全文
posted @ 2024-04-27 15:11 Cardi 阅读(21) 评论(0) 推荐(0)
摘要: task1 点击查看代码 #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-14 22:29 Cardi 阅读(18) 评论(0) 推荐(0)
摘要: task1 include <stdio.h> int main() { printf(" O O \n"); printf(" \n"); printf("I I I I\n"); return 0; } task2 include <stdio.h> int main() { float a, 阅读全文
posted @ 2024-03-16 12:16 Cardi 阅读(24) 评论(0) 推荐(0)