There is a saying in China that "three days of fishing for two days ". Assume that someone has "caught fish for two days" since one day and asked if this person is "caught fish" or "caught fish" in the next n days "?
Input Format:Enter a positive integer n that cannot exceed 1000 in a row.
Output Format:Output in a row whether the person is "fishing" or "drying" in the nth day, and "in day N ".
Input Example 1:103
Output Example 1:Fishing in day 103
Input Example 2:34
Output Example 2:Drying in day 34
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner day = new Scanner(System.in); int d = day.nextInt(); int i = d % 5; switch(i) { case 1: case 2: case 3: System.out.printf("Fishing in day " + d);break; case 0: case 4: System.out.printf("Drying in day " + d);break; } }}
Branch-03. Switch... Case)