Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Fruit_or_Vegetable
- {
- class Program
- {
- static void Main(string[] args)
- {
- string input = Console.ReadLine();
- if ((input == "banana")
- ||(input == "apple")
- ||(input == "kiwi")
- || (input == "cherry")
- ||(input == "lemon")
- ||(input == "grapes"))
- {
- Console.WriteLine("fruit");
- }
- else if ((input == "tomato")
- || (input == "cucumber")
- || (input == "pepper")
- || (input == "carrot"))
- {
- Console.WriteLine("vegetable");
- }
- else
- {
- Console.WriteLine("unknown");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement