摘要: #include<stdio.h> #define M 80 int main() { FILE *fp; char ch; fp = fopen("e:\\data4.txt","r"); if(fp == NULL) printf("fail to open file\n"); else { w 阅读全文
posted @ 2023-12-20 20:12 PomPom 阅读(12) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把这个数组改小一些输入测试 typedef struct student { int id; // 学号 char name[20]; // 姓名 char subje 阅读全文
posted @ 2023-12-18 10:17 PomPom 阅读(23) 评论(0) 推荐(0)
摘要: 实验任务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-04 10:34 PomPom 阅读(12) 评论(0) 推荐(0)
摘要: 实验任务1.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) printf("%p:%d\ 阅读全文
posted @ 2023-11-19 20:54 PomPom 阅读(13) 评论(0) 推荐(0)
摘要: 实验任务1 #include<stdio.h> #include<stdlib.h> #include<time.h> #include<windows.h> #define N 80 void print_text(int line , int co1 ,char text[]); void pr 阅读全文
posted @ 2023-11-04 15:31 PomPom 阅读(16) 评论(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-17 21:13 PomPom 阅读(41) 评论(1) 推荐(1)
摘要: 实验1 #include<stdio.h> int main() { printf(" 0\n"); printf("<H>\n"); printf("I I\n"); printf(" 0\n"); printf("<H>\n"); printf("I I\n"); return 0; } #in 阅读全文
posted @ 2023-10-06 20:13 PomPom 阅读(20) 评论(0) 推荐(0)