摘要: 实验任务1 源代码 点击查看代码 // P286例8.17 // 对教材示例代码作了微调,把输出学生信息设计成函数模块 // 打印不及格学生信息、打印所有学生信息均调用该模块实现 #include <stdio.h> #include <string.h> #define N 10 // 运行程序输 阅读全文
posted @ 2026-06-17 07:55 hanxiuying 阅读(5) 评论(0) 推荐(0)
摘要: 实验五 任务一 源代码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 * 阅读全文
posted @ 2026-06-03 00:34 hanxiuying 阅读(6) 评论(0) 推荐(0)
摘要: 实验四 实验任务1(验证) 源代码 点击查看代码 #include <stdio.h> #define N 4 #define M 2 void test1() { int x[N] = {1, 9, 8, 4}; int i; // 输出数组x占用的内存字节数 printf("sizeof(x) 阅读全文
posted @ 2026-05-05 23:48 hanxiuying 阅读(10) 评论(0) 推荐(0)
摘要: task.1 源代码 点击查看代码 #include <stdio.h> char score_to_grade(int score); // 函数声明 int main() { int score; char grade; while(scanf("%d", &score) != EOF) { g 阅读全文
posted @ 2026-04-19 22:20 hanxiuying 阅读(11) 评论(0) 推荐(0)
摘要: 实验1 源代码 点击查看代码 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int number; int i; srand(time(0)); // 以当前系统时间作为随机种子 f 阅读全文
posted @ 2026-04-05 13:04 hanxiuying 阅读(12) 评论(0) 推荐(0)
摘要: 源代码 点击查看代码 #include <windows.h> #include <stdio.h> #include <stdlib.h> int main() { system("chcp 65001"); float x,y,a; for(y=1.5;y>-1.5;y-=0.1) { for( 阅读全文
posted @ 2026-03-19 22:06 hanxiuying 阅读(33) 评论(0) 推荐(0)
摘要: 实验1 实验1 源代码 点击查看代码 #include <windows.h> #include <stdio.h> int main() { system("chcp 65001"); printf(" 0 \n"); printf("<H> \n"); printf("I I \n"); ret 阅读全文
posted @ 2026-03-18 18:38 hanxiuying 阅读(18) 评论(0) 推荐(0)