knikolov98

Untitled

Sep 11th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using System;
  2.  
  3. namespace class_animal
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             string animal = Console.ReadLine();
  11.             switch (animal)
  12.             {
  13.                 case "dog":
  14.  
  15.                         Console.WriteLine("mammal");
  16.  
  17.                     break;
  18.  
  19.                 case "snake":
  20.                 case "crocodile":
  21.                 case "tourtoise":
  22.                 Console.WriteLine("reptile");
  23.  
  24.                     break;
  25.                    
  26.                      default: Console.WriteLine("unknown");
  27.                         break;
  28.  
  29.             }
  30.  
  31.                
  32.  
  33.         }
  34.     }
  35. }
Add Comment
Please, Sign In to add comment