Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- const string ExitCommand = "exit";
- bool isWorking = true;
- string userInput;
- Console.WriteLine($"Введите {ExitCommand} для выхода из программы.");
- while (isWorking)
- {
- userInput = Console.ReadLine();
- if (userInput == ExitCommand)
- {
- isWorking = false;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment