A-0809-lemon

导航

2025年6月8日 #

实验七

摘要: 实验任务4 源代码: 1 #include<stdio.h> 2 #define N 100 3 int main(){ 4 FILE *fp= fopen("D:\\data4.txt", "r"); 5 if(!fp) { 6 printf("fail to open file to read\ 阅读全文

posted @ 2025-06-08 13:36 A0809-lemon 阅读(13) 评论(0) 推荐(0)

2025年6月2日 #

实验6

摘要: 实验任务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 阅读全文

posted @ 2025-06-02 17:29 A0809-lemon 阅读(5) 评论(0) 推荐(0)

2025年5月18日 #

实验五

摘要: 实验任务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 * 阅读全文

posted @ 2025-05-18 23:20 A0809-lemon 阅读(2) 评论(0) 推荐(0)

2025年4月17日 #

实验四

摘要: 实验任务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 printf("sizeof(x) = %d\n", sizeof 阅读全文

posted @ 2025-04-17 00:57 A0809-lemon 阅读(11) 评论(0) 推荐(0)

2025年4月6日 #

实验三

摘要: 实验任务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) 阅读全文

posted @ 2025-04-06 19:58 A0809-lemon 阅读(12) 评论(0) 推荐(0)

2025年3月17日 #

实验二

摘要: 实验任务1: Q1:解释lin13代码的功能 A1:设计出所需要取的随机数的区间,如题目中为区间100的随机数 Q2:解释line14使用格式符%04d起到什么作用 A2:确保number所占位数为4位,不够则用0来填充 Q3:这个程序的功能是什么 A3:取该专业学号伪随机数,可用于抽奖或抽人回答问 阅读全文

posted @ 2025-03-17 23:54 A0809-lemon 阅读(31) 评论(0) 推荐(0)

2025年3月3日 #

实验一

摘要: 实验任务1:源代码: 1 //打印一个字符小人 2 3 #include <stdio.h> 4 int main() 5 { 6 printf(" o \n"); 7 printf(" <H> \n"); 8 printf(" / \\ \n"); 9 printf(" I I\n"); 10 r 阅读全文

posted @ 2025-03-03 20:28 A0809-lemon 阅读(95) 评论(0) 推荐(0)