desislava_topuzakova

8. Клас цивотно

Nov 20th, 2021
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _08._Animal_Type
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string animalName = Console.ReadLine();
  10. //dog -> print mammal
  11. //crocodile, tortoise, snake -> print reptile
  12. //others -> unknown
  13. if (animalName == "dog")
  14. {
  15. Console.WriteLine("mammal");
  16. }
  17. else if (animalName == "crocodile" || animalName == "tortoise" || animalName == "snake")
  18. {
  19. Console.WriteLine("reptile");
  20. }
  21. else
  22. {
  23. Console.WriteLine("unknown");
  24. }
  25. }
  26. }
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment