Advertisement
VickSuna

Untitled

Feb 22nd, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _416_Fruit_or_Vegetable
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string input = Console.ReadLine();
  10.  
  11. switch (input)
  12. {
  13. case "banana":
  14. case "apple":
  15. case "kiwi":
  16. case "cherry":
  17. case "lemon":
  18. case "grapes":
  19. Console.WriteLine("fruit");
  20. break;
  21. case "tomato":
  22. case "cucumber":
  23. case "pepper":
  24. case "carrot":
  25. Console.WriteLine("vegetable");
  26. break;
  27. default:
  28. Console.WriteLine("unknown");
  29. break;
  30. }
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement