Advertisement
drunin89

AnimalType

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