摘要: 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-26 15:31 梅剑锋 阅读(16) 评论(0) 推荐(0) 编辑
摘要: task3 #include <stdio.h> #include<stdlib.h> #include<string.h> #define N 100 typedef struct { char num[10]; // 学号 int s1; // 期末成绩 int s2; // 平时成绩 doub 阅读全文
posted @ 2022-12-21 15:13 梅剑锋 阅读(15) 评论(0) 推荐(0) 编辑
摘要: task1_1 1 #include <stdio.h> 2 #include <stdlib.h> 3 #define N 4 4 5 int main() { 6 int a[N] = {1, 9, 8, 4}; 7 char b[N] = {'1', '9', '8', '4'}; 8 int 阅读全文
posted @ 2022-11-24 15:00 梅剑锋 阅读(38) 评论(0) 推荐(0) 编辑
摘要: task_1 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #include <windows.h> 5 #define N 80 6 void print_text(int line, int col, char 阅读全文
posted @ 2022-11-03 20:50 梅剑锋 阅读(30) 评论(0) 推荐(0) 编辑
摘要: task_1 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int number; int i; srand( time(0) ); number = rand()%31+1; pr 阅读全文
posted @ 2022-10-20 22:16 梅剑锋 阅读(31) 评论(0) 推荐(0) 编辑
摘要: task1_1 源代码 #include<stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n\n\n"); printf(" O \n"); printf("<H>\n"); printf("I I\n"); r 阅读全文
posted @ 2022-10-12 19:33 梅剑锋 阅读(47) 评论(0) 推荐(0) 编辑