generated from admin/template
lab-03
This commit is contained in:
@@ -19,15 +19,26 @@ Console.WriteLine($"{pokemon1Name} (HP: {pokemon1Hp} | Атака: {pokemon1Atta
|
||||
*/
|
||||
|
||||
// task 2
|
||||
|
||||
using System.ComponentModel.Design;
|
||||
|
||||
int choice;
|
||||
Console.Write("Готовы начать бой? (1 - Да, 0 - Нет): ");
|
||||
|
||||
do
|
||||
{
|
||||
choice = int.Parse(Console.ReadLine());
|
||||
Console.WriteLine("Некорректная команда! Попробуйте снова.");
|
||||
} while (choice != 1 && choice != 0);
|
||||
{
|
||||
Console.WriteLine("Некорректная команда! Попробуйте снова.");
|
||||
}
|
||||
if (choice == 1)
|
||||
{
|
||||
Console.WriteLine("Вы начали бой!");
|
||||
}
|
||||
|
||||
else if (choice == 0)
|
||||
{
|
||||
Console.WriteLine("Вы отменили бой!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректная команда! Попробуйте снова.");
|
||||
}
|
||||
} while (choice != 1 && choice != 0);
|
||||
|
||||
Reference in New Issue
Block a user