Added lab 3 and lab 4

This commit is contained in:
Mamedka
2026-10-28 00:14:59 +03:00
parent 27cac60e37
commit e464f7afd3
6 changed files with 185 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
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;
}
}
}