摘要: 四.实验任务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 dou 阅读全文
posted @ 2025-05-31 23:03 94kiiiiiig 阅读(22) 评论(0) 推荐(0)
摘要: 一.实验任务1 实验代码: 1 #define _CRT_SECURE_NO_WARNINGS 2 // 文件读写操作:格式化读、写文本文件 3 #include <stdio.h> 4 5 #define N 80 6 #define M 100 7 8 typedef struct { 9 ch 阅读全文
posted @ 2025-05-31 22:19 94kiiiiiig 阅读(32) 评论(0) 推荐(0)
摘要: 一.实验任务1 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, 阅读全文
posted @ 2025-05-29 08:04 94kiiiiiig 阅读(17) 评论(0) 推荐(0)
摘要: 一.实验任务1 #include <stdio.h> #define N 4 #define M 2 #include<stdlib.h> void test1() { int x[N] = {1, 9, 8, 4}; int i; // 输出数组x占用的内存字节数 printf("sizeof(x 阅读全文
posted @ 2025-04-20 23:37 94kiiiiiig 阅读(15) 评论(0) 推荐(0)
摘要: 一.实验任务1 实验代码: 1 #include <stdio.h> 2 3 char score_to_grade(int score); // 函数声明 4 5 int main() { 6 int score; 7 char grade; 8 9 while(scanf("%d", &scor 阅读全文
posted @ 2025-04-09 23:19 94kiiiiiig 阅读(20) 评论(0) 推荐(0)
摘要: 一.实验任务1 实验代码: #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int number; int i; srand(time(0)); // 以当前系统时间作为随机种子 fo 阅读全文
posted @ 2025-03-22 23:23 94kiiiiiig 阅读(42) 评论(0) 推荐(0)
摘要: 实验任务1 实验代码+运行结果: 1: #include <stdio.h> #include <stdlib.h> int main() { printf(" O \n"); printf("<H> \n"); printf("I I \n"); system("pause"); return 0 阅读全文
posted @ 2025-03-03 20:41 94kiiiiiig 阅读(28) 评论(0) 推荐(1)