摘要: task4 #include<stdio.h> int main(){ FILE *fp; fp=fopen("C:\\Users\\user\\Documents\\data4.txt","r"); if(feof(fp)){ printf("fail to open the file"); re 阅读全文
posted @ 2022-12-21 13:36 独悲 阅读(39) 评论(0) 推荐(0) 编辑
摘要: task3 #include <stdio.h> #include<string.h> #define N 100 typedef struct { char num[10]; // 学号 int s1; // 期末成绩 int s2; // 平时成绩 double sum; // 总评 char 阅读全文
posted @ 2022-12-21 08:45 独悲 阅读(25) 评论(0) 推荐(0) 编辑
摘要: task1 #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", sizeo 阅读全文
posted @ 2022-11-27 14:58 独悲 阅读(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[]); void print 阅读全文
posted @ 2022-11-06 17:05 独悲 阅读(16) 评论(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=0;i<N;++i) {number=rand( 阅读全文
posted @ 2022-10-20 10:38 独悲 阅读(37) 评论(0) 推荐(0) 编辑
摘要: task1 #include<stdio.h> int main() { printf(" O O \n"); printf("<H><H>\n"); printf("I II I\n"); return 0; } #include<stdio.h> int main() { printf(" O\ 阅读全文
posted @ 2022-10-13 14:42 独悲 阅读(33) 评论(0) 推荐(0) 编辑