1 /*B3-分支-03. 三天打鱼两天晒网
2 *Main.c
3 *测试通过
4 */
5
6 #include <stdio.h>
7 #include <stdlib.h>
8 int main()
9 {
10 int day;
11 int reminder;
12
13 scanf("%i", &day);
14 if (day <= 0 || day > 1000)
15 exit(0);
16 reminder = day % 5;
17 if (reminder == 0)
18 {
19 printf("Drying in day %i\n", day);
20 }
21 else
22 {
23 if (reminder <= 3)
24 {
25 printf("Fishing in day %i\n", day);
26 }
27 else
28 {
29 printf("Drying in day %i\n", day);
30 }
31 }
32 return 0;
33 }
分支-03. 三天打鱼两天晒网-B3
时间: 2024-10-29 05:22:45