摘要: task 4 #include<stdio.h> #include<stdlib.h> int main(){ FILE *fp; char ch; int cnt=0; fp = fopen("data4.txt","r"); if(fp==NULL){ printf("fail\n"); exi 阅读全文
posted @ 2023-12-21 22:56 吕江楠 阅读(3) 评论(0) 推荐(0) 编辑
摘要: task 4 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 阅读全文
posted @ 2023-12-17 23:44 吕江楠 阅读(1) 评论(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); int m 阅读全文
posted @ 2023-11-28 21:47 吕江楠 阅读(12) 评论(0) 推荐(0) 编辑
摘要: task1_1 #include <stdio.h> #define N 4 #include<stdlib.h> void test1() { int a[N] = {1, 9, 8, 4}; int i; // 输出数组a占用的内存字节数 printf("sizeof(a) = %d\n", s 阅读全文
posted @ 2023-11-15 23:56 吕江楠 阅读(12) 评论(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[]); // 函数声明 vo 阅读全文
posted @ 2023-11-05 15:02 吕江楠 阅读(4) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { char colour; while (scanf("%c", &colour) != EOF) { if (colour >= 'a' && colour <= 'z') { if (colour == 'r') { printf(" 阅读全文
posted @ 2023-10-16 17:34 吕江楠 阅读(2) 评论(0) 推荐(0) 编辑