摘要: 实验四 源代码 #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"); 阅读全文
posted @ 2023-12-20 19:42 Xmeik 阅读(10) 评论(0) 推荐(0)
摘要: 实验四 源代码 #include <stdio.h> #include<string.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double 阅读全文
posted @ 2023-12-11 19:46 Xmeik 阅读(37) 评论(0) 推荐(0)
摘要: 实验一 task1_1.c 源代码 #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, 阅读全文
posted @ 2023-11-27 17:22 Xmeik 阅读(27) 评论(0) 推荐(0)
摘要: 实验一 task1_1.c 源代码: #include <stdio.h> #define N 4 void test1() { int a[N] = {1, 9, 8, 4}; int i; // 输出数组a占用的内存字节数 printf("sizeof(a) = %d\n", sizeof(a) 阅读全文
posted @ 2023-11-13 19:35 Xmeik 阅读(36) 评论(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[]); void pri 阅读全文
posted @ 2023-10-31 20:25 Xmeik 阅读(21) 评论(0) 推荐(0)
摘要: 实验一 源代码 #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-16 20:33 Xmeik 阅读(32) 评论(0) 推荐(0)
摘要: 实验一 1.源代码 #include<iostream> using namespace std; int main() { cout<< " O " <<endl; cout<<"<H>"<<endl; cout<<"I I"<<endl; return 0; } 运行结果 2. 源代码 #inc 阅读全文
posted @ 2023-10-08 21:38 Xmeik 阅读(108) 评论(0) 推荐(0)