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