kwest87

Untitled

Dec 25th, 2023
923
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp9
  8. {
  9.     internal class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string userInput;
  14.             bool isWork = true;
  15.             string exitCommand = "exit";
  16.  
  17.             while (isWork)
  18.             {
  19.                 Console.WriteLine($"Выполнение программы. Для выхода напишите {exitCommand}.");
  20.                 userInput = Console.ReadLine();
  21.  
  22.                 if (userInput == exitCommand)
  23.                 {
  24.                     isWork = false;
  25.                 }
  26.             }
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment