摘要: #include <stdio.h>#include <stdlib.h>int main(){ char cr; FILE *fp; long count; if((fp=fopen("data4.txt","r"))==NULL) { printf("Can't open file.\n"); 阅读全文
posted @ 2022-12-27 21:58 墨森 阅读(15) 评论(0) 推荐(0) 编辑
摘要: Task 1 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把这个数组改小一些输入测试 typedef struct student { int id; // 学号 char name[20]; // 姓名 cha 阅读全文
posted @ 2022-12-25 15:16 墨森 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 #include<stdlib.h> #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(ing) 阅读全文
posted @ 2022-11-29 22:26 墨森 阅读(14) 评论(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[]); void pri 阅读全文
posted @ 2022-11-06 12:57 墨森 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 #include <stdlib.h> #include <stdio.h> #include<time.h> #define N 5 int main() { int number; int i; srand(time(0)); for (i = 1; i < N; ++i) { nu 阅读全文
posted @ 2022-10-19 21:38 墨森 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 实验任务1.1 #include<stdio.h> #include<stdlib.h> int main() { printf(" o \n"); printf("<H>\n"); printf("I I\n"); printf(" o \n"); printf("<H>\n"); printf( 阅读全文
posted @ 2022-10-15 07:19 墨森 阅读(8) 评论(0) 推荐(0) 编辑