Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [StartCode]
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp4
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- string command = "вход";
- while (command != "выход")
- {
- Console.WriteLine("Доступные команды : " + "\n" + "Включить свет : свет." + "\n" + "Включить чайник : чайник." + "\n" + "Включить музыку : музыка." + "\n" + "Открыть окно : окно." + "\n" + "Выход из меню : выход.");
- command = Console.ReadLine();
- switch (command)
- {
- case "свет":
- Console.WriteLine("Свет включился.");
- break;
- case "чайник":
- Console.WriteLine("Чайник закипел.");
- break;
- case "музыка":
- Console.WriteLine("Играет музыка.");
- break;
- case "окно":
- Console.WriteLine("Открылось окно.");
- break;
- case "телефон":
- Console.WriteLine("Можете говорить.");
- break;
- }
- }
- }
- }
- }
- [EndCode]
Advertisement
Add Comment
Please, Sign In to add comment