Mucunata101

Untitled

Mar 31st, 2017
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 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.  
  14. string animalType = Console.ReadLine();
  15.  
  16.  
  17. switch ("animalType")
  18. {
  19. case "dog":
  20. Console.WriteLine("mammal");
  21. break;
  22. case "crocodile":
  23. case "tortoise":
  24. case "snake":
  25. Console.WriteLine("reptile");
  26. break;
  27.  
  28. case "cat":
  29. Console.WriteLine("unknown");
  30. break;
  31.  
  32. default:
  33. Console.WriteLine("error");
  34. break;
  35.  
  36. }
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment