Advertisement
Kuncavia

10. AnimalType

Nov 27th, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1. using System;
  2.  
  3. class AnimalType
  4. {
  5.     static void Main(string[] args)
  6.     {
  7.         string animal = Console.ReadLine();
  8.  
  9.         switch (animal)
  10.         {
  11.             case "dog":
  12.                 Console.WriteLine("mammal");
  13.                 break;
  14.             case "crocodile":
  15.             case "tortoise":
  16.             case "snake":
  17.                 Console.WriteLine("reptile");
  18.                 break;
  19.             default:
  20.                 Console.WriteLine("unknown");
  21.                 break;
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement