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