摘要: task4.c #include<stdio.h> int main(){ int count; char ch; FILE *fp; fp=fopen("data4.txt","r"); if (fp==NULL){ printf("fail to open file\n"); return 1; 阅读全文
posted @ 2024-06-17 17:23 琳aaaaa 阅读(27) 评论(0) 推荐(0)
摘要: task4.c #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 阅读全文
posted @ 2024-06-03 23:11 琳aaaaa 阅读(26) 评论(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, int *pmax 阅读全文
posted @ 2024-05-21 00:03 琳aaaaa 阅读(36) 评论(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)); // 输出int 阅读全文
posted @ 2024-05-16 00:05 琳aaaaa 阅读(19) 评论(0) 推荐(0)
摘要: task1 #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-22 23:54 琳aaaaa 阅读(22) 评论(0) 推荐(0)
摘要: TASK 1 #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){ number = 阅读全文
posted @ 2024-04-10 22:13 琳aaaaa 阅读(16) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> int main() { printf(" o \n"); printf("<H> \n"); printf("I I \n"); printf(" o \n"); printf("<H> \n"); printf("I 阅读全文
posted @ 2024-03-13 23:47 琳aaaaa 阅读(22) 评论(0) 推荐(0)