1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-11-27 08:26:20 +00:00
202401-programming-assignments/【实践课外】2.选择结构1/7-1 三天打鱼两天晒网.c

18 lines
234 B
C
Raw Permalink Normal View History

2024-10-18 10:46:44 +00:00
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
int d = n % 5;
if (1 <= d && d <= 3) {
printf("Fishing in day %d\n", n);
} else {
printf("Drying in day %d\n", n);
}
return 0;
}