摘要: 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-25 19:20 李青秋 阅读(6) 评论(0) 推荐(0) 编辑
摘要: task3.c #include<stdio.h> #include<string.h> #include<stdlib.h> #define N 100 typedef struct { char num[10]; // 学号 int s1; // 期末成绩 int s2; // 平时成绩 dou 阅读全文
posted @ 2022-12-21 21:56 李青秋 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 task1.1c #include <stdio.h> #include<stdlib.h> #define N 4 int main() { int a[N] = {1, 9, 8, 4}; char b[N] = {'1', '9', '8', '4'}; int i; printf 阅读全文
posted @ 2022-11-25 13:57 李青秋 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> #define N 80 void print_text(int line, int col, char text[]); // 函 阅读全文
posted @ 2022-11-06 14:16 李青秋 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 #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-22 23:50 李青秋 阅读(5) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<stdlib.h> int main() { printf(" O O \n"); printf(" <H> <H> \n"); printf(" I I I I \n"); system("pause"); return 0; } task1- 阅读全文
posted @ 2022-10-15 00:41 李青秋 阅读(44) 评论(0) 推荐(0) 编辑