摘要: 实验任务4 代码 点击查看代码 #include<stdio.h> #include<stdlib.h> #include<string.h> int main() { FILE *fp; int line=0,len=0; char ch[1000]; char c; fp=fopen("C:\\ 阅读全文
posted @ 2025-12-30 21:05 张雨轩 阅读(7) 评论(1) 推荐(0)
摘要: 实验任务4 代码: 点击查看代码 #include <stdio.h> #include<stdlib.h> #define N 10 typedef struct { char isbn[20]; char name[80]; char author[80]; double sales_price 阅读全文
posted @ 2025-12-25 21:37 张雨轩 阅读(8) 评论(1) 推荐(0)
摘要: 实验任务1 task1_1 代码 点击查看代码 #include <stdio.h> #include<stdlib.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(i 阅读全文
posted @ 2025-12-11 18:21 张雨轩 阅读(10) 评论(1) 推荐(0)
摘要: 实验任务1 代码 点击查看代码 #include <stdio.h> #define N 4 #define M 2 void test1() { int x[N] = {1, 9, 8, 4}; int i; printf("sizeof(x) = %d\n", sizeof(x)); for ( 阅读全文
posted @ 2025-11-16 17:41 张雨轩 阅读(11) 评论(1) 推荐(0)
摘要: 实验任务1 问题1:根据得分分出5个等级,将百分制转化为等级制。形参是整型,返回值是字符型 问题2:无论输入多少,返回值都是E 代码: 点击查看代码 #include<stdio.h> char score_to_grade(int score); int main(){ int score; ch 阅读全文
posted @ 2025-10-30 23:49 张雨轩 阅读(14) 评论(1) 推荐(0)
摘要: 实验任务1 代码: 点击查看代码 #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 #define N1 80 #define N2 35 int main() { int cnt; int random_major, 阅读全文
posted @ 2025-10-19 15:17 张雨轩 阅读(7) 评论(1) 推荐(0)
摘要: 实验任务1 垂直小人 点击查看代码 #include <stdio.h> int main() { printf(" O \n<H>\nI I\n O \n<H>\nI I\n"); return 0; } 水平小人 点击查看代码 #include <stdio.h> int main() { pr 阅读全文
posted @ 2025-10-09 21:44 张雨轩 阅读(11) 评论(1) 推荐(0)