摘要: 任务4 #include <stdio.h> #include <stdlib.h> #include <stdbool.h> // 判断字符是否为空白字符(空格、回车、tab) bool is_blank(char c) { return c ==' ' || c == '\t' || c == 阅读全文
posted @ 2024-12-29 10:28 顾谢耀202383290109 阅读(15) 评论(0) 推荐(0)
摘要: 任务4 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 int 阅读全文
posted @ 2024-12-22 11:59 顾谢耀202383290109 阅读(13) 评论(0) 推荐(0)
摘要: 任务1_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 *pmin, int *pmax); 阅读全文
posted @ 2024-12-08 22:01 顾谢耀202383290109 阅读(70) 评论(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) = %d\n", sizeof(x)); 阅读全文
posted @ 2024-11-09 10:22 顾谢耀202383290109 阅读(17) 评论(0) 推荐(0)
摘要: 任务一: #include <stdio.h> char score_to_grade(int score); int main() { int score; char grade; while(scanf("%d", &score) != EOF) { grade = score_to_grade 阅读全文
posted @ 2024-10-29 21:10 顾谢耀202383290109 阅读(43) 评论(0) 推荐(0)
摘要: 任务1 1.rand()函数会生成一个伪随机整数。rand() % (N2 - N1 + 1)这部分会生成一个在0到N2 - N1范围内的随机数。再加上N1,就使得随机数的范围变为N1到N2。 2.rand()生成伪随机整数。rand() % N3会生成一个在0到N3 - 1范围内的随机数。再加上1 阅读全文
posted @ 2024-10-14 13:08 顾谢耀202383290109 阅读(98) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/guxieyao/ 阅读全文
posted @ 2024-09-30 10:39 顾谢耀202383290109 阅读(10) 评论(0) 推荐(0)
摘要: 任务1: // 打印一个字符小人 #include <stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); printf(" O \n"); printf("<H>\n"); printf("I I\n"); 阅读全文
posted @ 2024-09-30 10:34 顾谢耀202383290109 阅读(92) 评论(0) 推荐(0)