EmoRz

FruitOrVegetable

Jun 30th, 2016
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 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 FruitOrVegetable
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var enter = Console.ReadLine().ToString();
  14. if(enter=="banana"||enter=="apple"||enter=="kiwi"||enter=="cherry"||enter=="lemon"||enter=="grapes")
  15. {
  16. Console.WriteLine("fruit");
  17. }
  18. else if (enter=="tomato"||enter=="cucumber"||enter=="pepper"||enter=="carrot")
  19. {
  20. Console.WriteLine("vegetable");
  21. }
  22. else
  23. {
  24. Console.WriteLine("unknown");
  25. }
  26. }
  27. }
  28. }
  29. //fruit" са banana, apple, kiwi, cherry, lemon и grapes
  30. //"vegetable" са tomato, cucumber, pepper и carrot
Advertisement
Add Comment
Please, Sign In to add comment