SHARE
TWEET

Untitled

a guest Nov 9th, 2016 287 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace FruitOrVegetable2
  8. {
  9.     class Program
  10.     {
  11.         private static object stringInput;
  12.  
  13.         static void Main(string[] args)
  14.         {
  15.             string vegetable = Console.ReadLine();
  16.             string fruit = Console.ReadLine();
  17.             if (stringInput.Equals("banana") || stringInput.Equals("apple") || stringInput.Equals("kiwi") || stringInput.Equals("cherry")
  18.                 || stringInput.Equals("lemon") || stringInput.Equals("grapes"))
  19.             {
  20.                 Console.WriteLine("fruit");
  21.             }
  22.             else if (stringInput.Equals("tomato") || stringInput.Equals("cucumber") || stringInput.Equals("pepper") || stringInput.Equals("carrot"))
  23.             {
  24.                 Console.WriteLine("vegetable");
  25.             }
  26.             else
  27.             {
  28.                 Console.WriteLine("unknown");
  29.             }
  30.         }
  31.     }
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top