摘要: #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-28 08:58 王文博1 阅读(9) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include<string.h> #include<stdlib.h> #define N 100 typedef struct { char num[10]; // 学号 int s1; // 阅读全文
posted @ 2022-12-21 08:54 王文博1 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 任务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 18:53 王文博1 阅读(6) 评论(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[]); // 函数声 阅读全文
posted @ 2022-11-03 19:27 王文博1 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 任务一 #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) { num 阅读全文
posted @ 2022-10-19 15:07 王文博1 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 实验1#include <stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); printf(" O \n"); printf("<H>\n"); printf("I I\n"); return 0; } # 阅读全文
posted @ 2022-10-13 11:26 王文博1 阅读(32) 评论(0) 推荐(0) 编辑