摘要: Task4 1 #include <stdio.h> 2 3 int main() { 4 FILE* fp = fopen("data4.txt", "r"); 5 6 int count = 0; 7 char c; 8 if (fp ==NULL) { 9 printf("fail to op 阅读全文
posted @ 2024-06-17 16:09 InitialJ 阅读(27) 评论(0) 推荐(0)
摘要: Task4 1 #include <stdio.h> 2 #include<stdlib.h> 3 #define N 10 4 5 typedef struct { 6 char isbn[20]; // isbn号 7 char name[80]; // 书名 8 char author[80] 阅读全文
posted @ 2024-06-03 20:18 InitialJ 阅读(26) 评论(0) 推荐(0)
摘要: Task1 task1_1 1 #include <stdio.h> 2 #define N 5 3 #include<stdlib.h> 4 5 void input(int x[], int n); 6 void output(int x[], int n); 7 void find_min_m 阅读全文
posted @ 2024-05-20 22:17 InitialJ 阅读(35) 评论(0) 推荐(0)
摘要: Task1 task1_1 1 #include <stdio.h> 2 #include<stdlib.h> 3 #define N 4 4 5 void test1() { 6 int a[N] = {1, 9, 8, 4}; 7 int i; 8 9 // 输出数组a占用的内存字节数 10 p 阅读全文
posted @ 2024-05-18 14:27 InitialJ 阅读(23) 评论(0) 推荐(0)
摘要: Task1 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 阅读全文
posted @ 2024-04-22 23:16 InitialJ 阅读(40) 评论(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=rand( 阅读全文
posted @ 2024-04-08 22:25 InitialJ 阅读(32) 评论(0) 推荐(0)
摘要: 实验任务一 task1_1 1 #include<stdio.h> 2 #include<stdlib.h> 3 int main() 4 { 5 printf(" 0 \n"); 6 printf("<H>\n"); 7 printf("I I\n"); 8 printf(" 0 \n"); 9 阅读全文
posted @ 2024-03-13 20:47 InitialJ 阅读(91) 评论(0) 推荐(0)