摘要: 实验四 1 #include <stdio.h> 2 int main(){ 3 FILE *p; 4 int i=0; 5 char ch; 6 p=fopen("data4.txt","r"); 7 if(p==NULL) {printf("wrong");exit(0);} 8 while(! 阅读全文
posted @ 2023-12-18 10:22 夏夜# 阅读(16) 评论(0) 推荐(0)
摘要: task 1 1 // P286例8.17 2 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 3 // 打印不及格学生信息和所有学生信息程分别调用 4 5 #include <stdio.h> 6 #include <string.h> 7 #define N 3 // 运行 阅读全文
posted @ 2023-12-14 19:40 夏夜# 阅读(13) 评论(0) 推荐(0)
摘要: 实验1 1 #include <stdio.h> 2 #define N 5 3 4 void input(int x[], int n); 5 void output(int x[], int n); 6 void find_min_max(int x[], int n, int *pmin, i 阅读全文
posted @ 2023-12-04 10:41 夏夜# 阅读(9) 评论(0) 推荐(0)
摘要: 实验1 1 #include <stdio.h> 2 #define N 4 3 4 void test1( ){ 5 int a[N] = {1,9,8,4}; 6 int i; 7 8 printf("sizeof(a) = %d\n", sizeof(a)); 9 10 for(i=0;i<N 阅读全文
posted @ 2023-11-18 19:23 夏夜# 阅读(15) 评论(0) 推荐(0)
摘要: 任务1 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #include <windows.h> 5 #define N 80 6 7 void print_text(int line, int col, char t 阅读全文
posted @ 2023-11-04 15:27 夏夜# 阅读(13) 评论(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-18 22:34 夏夜# 阅读(31) 评论(0) 推荐(0)
摘要: 实验1 实验1-1 1 // 打印一个字符小人 2 3 #include <stdio.h> 4 int main() 5 { 6 printf(" O \n"); 7 printf("<H>\n"); 8 printf("I I\n"); 9 printf(" O \n"); 10 printf( 阅读全文
posted @ 2023-10-06 15:44 夏夜# 阅读(132) 评论(0) 推荐(0)