摘要: task4 #include <stdio.h> int main() { FILE *fp; int n=0; char a ; fp = fopen("data4.txt","r"); if(fp == NULL) { printf("fail to open file \n"); return 阅读全文
posted @ 2023-12-20 22:46 bunga 阅读(13) 评论(0) 推荐(0)
摘要: task1 // P286例8.17 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include <stdio.h> #include <string.h> #define N 10 // 运行程序输入测试时,可以把这个数 阅读全文
posted @ 2023-12-16 21:43 bunga 阅读(24) 评论(0) 推荐(0)
摘要: task1.1 #include <stdio.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(int x[], int n, int *pmin, int *pmax 阅读全文
posted @ 2023-12-03 22:11 bunga 阅读(18) 评论(0) 推荐(0)
摘要: task1_1 #include <stdio.h> #define N 4 void test1() { int a[N] = {1, 9, 8, 4}; int i; printf("sizeof(a) = %d\n", sizeof(a)); for (i = 0; i < N; ++i) p 阅读全文
posted @ 2023-11-18 16:23 bunga 阅读(23) 评论(0) 推荐(0)
摘要: task1 #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 阅读全文
posted @ 2023-11-01 20:00 bunga 阅读(19) 评论(0) 推荐(0)
摘要: 实验任务1 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define N1 374 #define N2 465 int main() { int number; int i; srand( time(0 阅读全文
posted @ 2023-10-21 21:09 bunga 阅读(15) 评论(0) 推荐(0)
摘要: task1_1.c源码 #include <stdio.h> int main() { printf(" 0 \n"); printf("<H>\n"); printf("I I\n"); return 0; } task1_1.c运行结果截图 task2 task3 #include <stdio 阅读全文
posted @ 2023-10-03 15:35 bunga 阅读(29) 评论(0) 推荐(0)