generated from admin/template
24 lines
618 B
C#
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;
|
|
}
|
|
}
|
|
} |