实验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 唐思齐 阅读(5) 评论(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 唐思齐 阅读(5) 评论(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 唐思齐 阅读(18) 评论(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 唐思齐 阅读(8) 评论(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 唐思齐 阅读(13) 评论(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 唐思齐 阅读(6) 评论(0) 推荐(0)

task5.c

摘要: include <stdio.h> include<math.h> int main() { double year; int sec; int time; sec = 1000000000; time = 30758400; year = sec / time; year = (int)round 阅读全文
posted @ 2025-10-09 17:43 唐思齐 阅读(7) 评论(0) 推荐(0)

task4.c

摘要: include<stdio.h> int main() { double x, y; char c1, c2, c3; int a1, a2, a3; scanf_s("%d%d%d", &a1, &a2,&a3); printf("a1 = %d, a2 = %d, a3= %d\n", a1, 阅读全文
posted @ 2025-10-09 17:11 唐思齐 阅读(6) 评论(0) 推荐(0)

task3.c

摘要: include <stdio.h> int main() { char ans1, ans2; printf("每次课前认真预习,课后及时复习了吗?(输入y或Y表示有,输入n或N表示没有): "); ans1 = getchar(); getchar(); printf("\n动手敲代码实践了没?( 阅读全文
posted @ 2025-10-09 00:24 唐思齐 阅读(8) 评论(0) 推荐(0)