摘要: TASK 4 #include<stdio.h> int main() { int cnt=0; char c; FILE *fp; fp = fopen("data4.txt","r"); if(fp == NULL){ printf("fail to open the file\n"); ret 阅读全文
posted @ 2024-06-21 13:45 徐涵章 阅读(25) 评论(0) 推荐(0)
摘要: TASK1 #include <stdio.h> #include <string.h> #define N 3 typedef struct student { int id; char name[20]; char subject[20]; double perf; double mid; do 阅读全文
posted @ 2024-06-05 21:25 徐涵章 阅读(49) 评论(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-26 20:54 徐涵章 阅读(24) 评论(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-19 20:25 徐涵章 阅读(15) 评论(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[]); void print 阅读全文
posted @ 2024-04-28 21:56 徐涵章 阅读(22) 评论(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()%65 阅读全文
posted @ 2024-04-14 21:20 徐涵章 阅读(14) 评论(0) 推荐(0)
摘要: task1 #include <stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); return 0; } #include <stdio.h> int main() { printf(" O \n"); 阅读全文
posted @ 2024-03-13 23:19 徐涵章 阅读(12) 评论(0) 推荐(0)