Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- internal class Program
- {
- static void Main(string[] args)
- {
- string exitWord = "exit";
- string userInput;
- bool canWork = true;
- while (canWork)
- {
- Console.WriteLine($"Программа еще работает.\nДля завершения введите: {exitWord}.");
- userInput = Console.ReadLine();
- if (userInput == exitWord)
- {
- canWork = false;
- }
- }
- Console.WriteLine("Программа завершена.");
- Console.ReadKey();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement