Advertisement
Kuncavia

FruitorVegetable

Nov 27th, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1. using System;
  2.  
  3. class FruitorVegetable
  4. {
  5.     static void Main(string[] args)
  6.     {
  7.         var kor = Console.ReadLine();
  8.         if (kor == "banana" || kor == "apple" || kor == "kiwi" || kor == "cherry" || kor == "lemon" || kor == "grapes")
  9.             Console.WriteLine("fruit");
  10.         else if (kor == "tomato" || kor == "cucumber" || kor == "pepper" || kor == "carrot")
  11.             Console.WriteLine("vegetable");
  12.         else
  13.             Console.WriteLine("unknown");
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement