From 8b5b80e9d523c0b95f04cf8c5bf55f9861a02f06 Mon Sep 17 00:00:00 2001 From: Amir Date: Fri, 4 Sep 2026 13:32:17 +0300 Subject: [PATCH] fixcode.1 --- works/lab-02/ConsoleApp1/Program.cs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/works/lab-02/ConsoleApp1/Program.cs b/works/lab-02/ConsoleApp1/Program.cs index 70b2112..58416d3 100644 --- a/works/lab-02/ConsoleApp1/Program.cs +++ b/works/lab-02/ConsoleApp1/Program.cs @@ -16,6 +16,7 @@ int result = amountPotion * potionCost; Console.WriteLine(result); */ +/* less 2.1 int hp = int.Parse(Console.ReadLine()); if (hp <= 0) @@ -34,4 +35,28 @@ else if (21 <= hp && hp <= 50) else { Console.WriteLine("Покемон полон сил и готов к бою!"); +} +*/ + +Console.WriteLine("1: \n2: \n3: \n4"); + +int num = int.Parse(Console.ReadLine()); + +switch(num) +{ + case 1 : + Console.WriteLine("Покемон наносит быстрый удар"); + break; + case 2 : + Console.WriteLine("Вы открыли сумку и применили Зелье Лечения."); + break; + case 3 : + Console.WriteLine("Вы отозвали покемона и выпустили нового!"); + break; + case 4 : + Console.WriteLine("Вы успешно сбежали из боя!"); + break; + default: + Console.WriteLine("Неизвестная команда! Вы пропустили ход."); + break; } \ No newline at end of file