Files
2026-10-28 00:14:59 +03:00

24 lines
618 B
C#

using System;
namespace HelloWorldApplication
{
class HelloWorld
{
int choice;
do
{
Console.Write("Готовы начать бой? (1 - Да, 0 - Нет): ");
choice = int.Parse(Console.ReadLine());
if (choice != 1 && choice != 0)
{
Console.WriteLine("Некорректная команда! Попробуйте снова.");
}
} while (choice != 1 && choice != 0);
if (choice == 0)
{
Console.WriteLine("Вы отменили бой!");
return;
}
}
}