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 fruit_or_vegetable
- {
- static void Main(string[] args)
- {
- string s = Console.ReadLine();
- if (s == "banana" || s == "apple" || s == "cherry" || s == "kiwi" || s == "lemon" || s == "grapes")
- Console.WriteLine("fruit");
- else if (s == "tomato" || s == "cucumber" || s == "pepper" || s == "carrot")
- Console.WriteLine("vegetable");
- else Console.WriteLine("unknown");
- //banana, apple, kiwi, cherry, lemon и grapes tomato, cucumber, pepper и carrot
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement