Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace FruitOrVegetable
- {
- using System;
- class FruitOrVegetable
- {
- static void Main()
- {
- var s = Console.ReadLine();
- if (s=="banana" || s == "apple" || s == "kiwi" || s == "cherry" || s == "lemon" || s == "grapes" )
- {
- Console.WriteLine("fruit");
- }
- else if (s == "tomato" || s == "cucumber" || s == "pepper" || s == "carrot" )
- {
- Console.WriteLine("vegetable");
- }
- else
- {
- Console.WriteLine("unknown");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement