实验7

摘要: task1 源代码 点击查看代码 #include <stdio.h> #define N 80 #define M 100 typedef struct { char name[N]; // 书名 char author[N]; // 作者 } Book; void write(); void r 阅读全文
posted @ 2025-12-31 19:57 唐思齐 阅读(4) 评论(1) 推荐(0)

实验6

摘要: task1.c 源代码 点击查看代码 #include <stdio.h> #include <string.h> #define N 10 // 运行程序输入测试时,可以把N改小一些输入测试 typedef struct student { int id; // 学号 char name[20]; 阅读全文
posted @ 2025-12-25 13:01 唐思齐 阅读(9) 评论(1) 推荐(0)

实验5

摘要: task1_1.c 源代码 点击查看代码 #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find 阅读全文
posted @ 2025-12-12 01:44 唐思齐 阅读(9) 评论(1) 推荐(0)

实验4

摘要: task1.c 源代码 点击查看代码 #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define N 4 #define M 2 void test1() { int x[N] = { 1, 9, 8, 4 }; int i; printf( 阅读全文
posted @ 2025-11-17 15:35 唐思齐 阅读(9) 评论(1) 推荐(0)

实验3

摘要: task1.c 点击查看代码 #include <stdio.h> char score_to_grade(int score); int main(){ int score; char grade; while(scanf("%d", &score) != EOF) { grade = score 阅读全文
posted @ 2025-10-31 08:00 唐思齐 阅读(17) 评论(1) 推荐(0)

实验2

摘要: task1.c源代码 点击查看代码 #include<stdlib.h> #include<time.h> #define N 5 #define N1 80 #define N2 35 int main(){ int cnt; int random_majior, random_no; srand 阅读全文
posted @ 2025-10-19 16:11 唐思齐 阅读(19) 评论(1) 推荐(0)

实验1

摘要: //task.1_2.c include <stdio.h> int main() { printf("%s\t%s\t\n"," 0"," 0"); printf("%s\t%s\t\n","", ""); printf("%s\t%s\t\n","I I","I I"); return 0; } 阅读全文
posted @ 2025-10-09 22:54 唐思齐 阅读(12) 评论(1) 推荐(0)

task8.c

摘要: include<stdio.h> include<math.h> int main() { double s, a, b, c, area; while (scanf_s("%lf%lf%lf", &a, &b, &c) != EOF) { s = (a + b + c) / 2; area = s 阅读全文
posted @ 2025-10-09 19:16 唐思齐 阅读(17) 评论(0) 推荐(0)

task7.c

摘要: include<stdio.h> int main() { double F, C; while(scanf_s("%lf", &C) != EOF) { F = 9 / 5 * C + 32; printf("%.2f转化为华氏度为:%.2f\n", C, F); printf("\n"); } 阅读全文
posted @ 2025-10-09 18:20 唐思齐 阅读(6) 评论(0) 推荐(0)

task6.c

摘要: include<stdio.h> include<math.h> int main() { double x, ans; scanf_s("%lf", &x); ans = pow(x, 365); printf("%.2f的365次方: %.2f\n", x, ans); return 0; } 阅读全文
posted @ 2025-10-09 17:54 唐思齐 阅读(10) 评论(0) 推荐(0)