Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.*;
- public class Main {
- public static void main(String[] args) {
- Scanner input = new Scanner (System.in);
- int remainder = input.nextInt() % 12;
- String animal="";
- switch (remainder)
- {
- case 0: animal = "Monkey";
- break;
- case 1: animal = "Rooster";
- break;
- case 2: animal = "Dog";
- break;
- case 3: animal = "Pig";
- break;
- case 4: animal = "Rat";
- break;
- case 5: animal = "Ox";
- break;
- case 6: animal = "Tiger";
- break;
- case 7: animal = "Rabbit";
- break;
- case 8: animal = "Dragon";
- break;
- case 9: animal = "Snake";
- break;
- case 10: animal = "Horse";
- break;
- case 11: animal = "Ram";
- break;
- }
- System.out.println(animal);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement