MiroslavKisov

Fruit_Or_Vegetable

Jul 26th, 2017
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 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 Fruit_Or_Vegetable
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string product = Console.ReadLine();
  14.             if(product=="banana"||product=="apple"||product=="cherry"||product=="kiwi"||product=="lemon"||product=="grapes")
  15.             {
  16.                 Console.WriteLine("fruit");
  17.             }
  18.             else if(product=="tomato"||product=="cucumber"||product=="pepper"||product=="carrot")
  19.             {
  20.                 Console.WriteLine("vegetable");
  21.             }
  22.             else
  23.             {
  24.                 Console.WriteLine("unknown");
  25.             }
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment