SHARE
TWEET

Untitled

knikolov98 Sep 17th, 2019 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace Fruit_or_vegetable
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string input = Console.ReadLine();
  10.  
  11.             switch (input)
  12.             {
  13.                 case "banana":
  14.                 case "apple":
  15.                 case "kiwi":
  16.                 case "cherry":
  17.                 case "lemon":
  18.                 case "grapes":
  19.                     Console.WriteLine("fruit");
  20.                     break;
  21.  
  22.                 case "tomato":
  23.                 case "cucumber":
  24.                 case "pepper":
  25.                 case "carrot":
  26.                     Console.WriteLine("vegetable");
  27.                     break;
  28.  
  29.  
  30.                 default:
  31.                     Console.WriteLine("unknown");
  32.                     break;
  33.             }
  34.         }
  35.     }
  36. }
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