Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- string command;
- bool isProgramWorking = true;
- while (isProgramWorking)
- {
- Console.Write("Введите команду: ");
- command = Console.ReadLine();
- if (command == "exit")
- {
- isProgramWorking = false;
- Console.WriteLine("Работа программы завершена!");
- }
- else
- {
- Console.WriteLine($"Вы ввели команду {command}");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment