摘要: 实验任务4 1 #include<stdio.h> 2 int main(){ 3 FILE *fp; 4 char ch; 5 int lines=0, chars=0; 6 int blank=0; 7 fp = fopen("data4.txt","r"); 8 while((ch = fge 阅读全文
posted @ 2025-06-06 20:00 王润淇 阅读(22) 评论(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 sale 阅读全文
posted @ 2025-06-01 20:35 王润淇 阅读(17) 评论(0) 推荐(0)
摘要: 实验任务1 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 *pma 阅读全文
posted @ 2025-05-18 22:10 王润淇 阅读(19) 评论(0) 推荐(0)
摘要: 实验任务1 代码 1 #include <stdio.h> 2 #define N 4 3 #define M 2 4 5 void test1() { 6 int x[N] = {1, 9, 8, 4}; 7 int i; 8 9 // 输出数组x占用的内存字节数 10 printf("sizeo 阅读全文
posted @ 2025-04-19 22:59 王润淇 阅读(16) 评论(0) 推荐(0)
摘要: 实验任务1 代码: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #define N 5 5 int main() { 6 int number; 7 int i; 8 srand(time(0)); // 以当前系 阅读全文
posted @ 2025-03-21 22:36 王润淇 阅读(32) 评论(0) 推荐(0)
摘要: 实验任务1 1—1 代码: 1 // 打印一个字符小人 2 #include <stdio.h> 3 int main() 4 { 5 printf(" O \n"); 6 printf("<H>\n"); 7 printf("I I\n"); 8 return 0; 9 } 运行截图: 1—2 代 阅读全文
posted @ 2025-03-08 20:58 王润淇 阅读(18) 评论(0) 推荐(0)