摘要: task4 #include<stdio.h> int main() { int cnt=0; char ch; FILE *fp; fp=fopen("data4.txt","r"); if(fp==NULL) { printf("fail to open file\n"); return ; } 阅读全文
posted @ 2024-06-23 21:02 纯爱的陈汉升 阅读(23) 评论(0) 推荐(0)
摘要: task4 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 i 阅读全文
posted @ 2024-06-09 10:37 纯爱的陈汉升 阅读(16) 评论(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-25 22:31 纯爱的陈汉升 阅读(27) 评论(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类型数组a中每个 阅读全文
posted @ 2024-05-18 21:23 纯爱的陈汉升 阅读(34) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #include <windows.h> 5 #define N 80 6 7 void print_text(int line, int col, char text[ 阅读全文
posted @ 2024-04-27 21:06 纯爱的陈汉升 阅读(27) 评论(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) { number 阅读全文
posted @ 2024-04-14 19:20 纯爱的陈汉升 阅读(18) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> int main() { printf(" o \t o \n"); printf("<H>\t <H>\n"); printf("I I \t I I\n"); system("pause"); return 0; } 阅读全文
posted @ 2024-03-16 18:28 纯爱的陈汉升 阅读(40) 评论(0) 推荐(0)