Advertisement
ad2bg

AnimalType

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