Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Project: Complex_Conditions - created by borkins on 2017-03-26.
- */
- import java.util.Scanner;
- public class _10_AnimalType
- {
- public static void main(String[] args)
- {
- Scanner console = new Scanner(System.in);
- String animal = console.nextLine().toLowerCase();
- switch (animal)
- {
- case "dog":
- System.out.println("mammal");
- break;
- case "crocodile":
- case "tortoise":
- case "snake":
- System.out.println("reptile");
- break;
- default:
- System.out.println("unknown");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment