Skip to content

Instantly share code, notes, and snippets.

@mazdan18
Last active February 7, 2025 04:47
Show Gist options
  • Save mazdan18/abb1a74f7b2aeec1d4aaecdfa7d0fed4 to your computer and use it in GitHub Desktop.
Save mazdan18/abb1a74f7b2aeec1d4aaecdfa7d0fed4 to your computer and use it in GitHub Desktop.
using System;
namespace Контроль_выхода
{
internal class Program
{
static void Main(string[] args)
{
string keyWord = "exit";
string answer;
Console.WriteLine($"Для выхода наберите {keyWord} ");
answer = Console.ReadLine();
while (answer != keyWord)
{
Console.WriteLine($"Вы выбрали неправильное слова, наберите {keyWord} ");
answer = Console.ReadLine();
}
Console.WriteLine("Поздравляем!!, вы выбрались ");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment