摘要: 实验1 源代码 1 #include <stdio.h> 2 #include <string.h> 3 #define N 80 4 #define M 100 5 // 定义图书结构体 6 typedef struct { 7 char name[N]; // 书名 8 char author[ 阅读全文
posted @ 2025-12-30 16:04 错过不算爱 阅读(6) 评论(0) 推荐(0)
摘要: 实验1 源代码 1 // P286例8.17 2 // 对教材示例代码作了微调,把输出学生信息设计成函数模块 3 // 打印不及格学生信息、打印所有学生信息均调用该模块实现 4 5 #include <stdio.h> 6 #include <string.h> 7 #define N 3 // 运 阅读全文
posted @ 2025-12-21 12:05 错过不算爱 阅读(6) 评论(1) 推荐(0)
摘要: 实验1 源代码 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[], int n, int *pmi 阅读全文
posted @ 2025-12-07 13:19 错过不算爱 阅读(5) 评论(1) 推荐(0)
摘要: 实验1 源代码 1 #include <stdio.h> 2 #define N 4 3 #define M 2 4 void test1() { 5 int x[N] = {1, 9, 8, 4}; 6 int i; 7 // 输出数组x占用的内存字节数 8 printf("sizeof(x) = 阅读全文
posted @ 2025-11-16 15:38 错过不算爱 阅读(6) 评论(1) 推荐(0)
摘要: 实验1 源代码 1 #include <stdio.h> 2 char score_to_grade(int score); 3 int main() { 4 int score; 5 char grade; 6 while(scanf("%d", &score) != EOF) { 7 grade 阅读全文
posted @ 2025-10-28 13:34 错过不算爱 阅读(6) 评论(1) 推荐(0)
摘要: 试验1 源代码 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #define N 5 5 #define N1 80 6 #define N2 35 7 int main() { 8 int cnt; 9 int r 阅读全文
posted @ 2025-10-14 14:43 错过不算爱 阅读(12) 评论(1) 推荐(0)
摘要: 实验1 源代码 1 #include<stdio.h> 2 int main() 3 { 4 printf(" o\n"); 5 printf("<H>\n"); 6 printf("I I\n"); 7 8 return 0; 9 } View Code 运行结果 实验2 1 #include<s 阅读全文
posted @ 2025-10-08 14:44 错过不算爱 阅读(10) 评论(1) 推荐(0)