摘要: 实验任务4:文件简单应用 程序源码 1 #include<stdio.h> 2 3 int main(){ 4 FILE *fp; 5 long size; 6 int c; 7 int count = 0; 8 fp = fopen("C:\\data\\data4.txt", "rb"); 9 阅读全文
posted @ 2023-12-20 19:23 Eternity// 阅读(21) 评论(0) 推荐(0)
摘要: 实验任务4 程序源码 1 #include <stdio.h> 2 #define N 10 3 4 typedef struct { 5 char isbn[20]; // isbn号 6 char name[80]; // 书名 7 char author[80]; // 作者 8 double 阅读全文
posted @ 2023-12-12 16:10 Eternity// 阅读(14) 评论(0) 推荐(0)
摘要: 实验任务1 task1_1.c 程序源码 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[], in 阅读全文
posted @ 2023-11-29 22:25 Eternity// 阅读(17) 评论(0) 推荐(0)
摘要: 实验任务1 task1_1.c 程序源码 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 9 printf("sizeof(a) = %d\n", sizeof(a 阅读全文
posted @ 2023-11-19 09:58 Eternity// 阅读(30) 评论(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 阅读全文
posted @ 2023-11-05 15:49 Eternity// 阅读(13) 评论(0) 推荐(0)
摘要: 实验任务1 源代码 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 5 #define N 5 6 #define N1 374 7 #define N2 465 8 9 int main () 10 { 11 int 阅读全文
posted @ 2023-10-21 20:31 Eternity// 阅读(14) 评论(0) 推荐(0)
摘要: 实验任务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 p 阅读全文
posted @ 2023-10-03 16:28 Eternity// 阅读(13) 评论(0) 推荐(0)