Yachkov

Animal Type

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