摘要: task4 #include<stdio.h>#include<stdlib.h>int main(){ FILE *fp; int count=0; fp=fopen("data4.txt","r"); if(fp==NULL){ printf("fail to open the file"); 阅读全文
posted @ 2022-12-24 14:33 sakura—— 阅读(35) 评论(0) 推荐(0)
摘要: task1 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把这个数组改小一些输入测试 typedef struct student { int id; // 学号 char name[20]; // 姓名 char 阅读全文
posted @ 2022-12-21 09:35 sakura—— 阅读(33) 评论(0) 推荐(0)
摘要: task1.1 #include <stdio.h> #define N 4 int main() { int a[N] = {1, 9, 8, 4}; char b[N] = {'1', '9', '8', '4'}; int i; printf("sizeof(int) = %d\n", siz 阅读全文
posted @ 2022-11-23 20:41 sakura—— 阅读(21) 评论(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 pirnt 阅读全文
posted @ 2022-11-06 23:00 sakura—— 阅读(34) 评论(0) 推荐(0)
摘要: task1 #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 int main() { int number; int i; srand(time(0)); for(i = 1; i < N; i++) { numbe 阅读全文
posted @ 2022-10-24 13:07 sakura—— 阅读(21) 评论(0) 推荐(0)
摘要: task1.c 1 #include<stdio.h> 2 int main() 3 { 4 printf(" O O \n"); 5 printf(" <H> <H> \n"); 6 printf(" I I I I \n"); 7 return 0; 8 } task1_2c #include< 阅读全文
posted @ 2022-10-15 08:29 sakura—— 阅读(88) 评论(0) 推荐(0)