Advertisement
desislava_topuzakova

using System; namespace urok3 { class Program { static void Main(string[] args)

Oct 14th, 2023
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1.  
  2. string product = Console.ReadLine();
  3. switch (product)
  4. {
  5. case "banana":
  6. case "apple":
  7. case "kiwi":
  8. case "cherry":
  9. case "lemon":
  10. case "grapes":
  11. Console.WriteLine("fruit");
  12. break;
  13. case "tomato":
  14. case "cucumber":
  15. case "pepper":
  16. case "carrot":
  17. Console.WriteLine("vegetable");
  18. break;
  19.  
  20. default:
  21. Console.WriteLine("unknown");
  22. break;
  23. }
  24.  
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement