grach

AnimalType

Jul 12th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 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 Animal_Type
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var animal = Console.ReadLine();
  14.            
  15.             switch (animal)
  16.             {
  17.                 case "dog": Console.WriteLine("mammal");break;
  18.                 case "snake":
  19.                 case "crocodile":
  20.                 case "tortoise":
  21.                     Console.WriteLine("reptile"); break;
  22.                 default: Console.WriteLine("unknown");break;
  23.             }
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment