From 8a0564df75f3b5ebc063fe8d0b7e1196564407d4 Mon Sep 17 00:00:00 2001 From: zxc <33+zxc@noreply.localhost> Date: Tue, 8 Sep 2026 09:00:23 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20works/lab-01/=D0=BC=D0=B8=D1=83=20=D0=BC=D0=B8=D1=83.t?= =?UTF-8?q?xt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- works/lab-01/миу миу.txt | 65 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/works/lab-01/миу миу.txt b/works/lab-01/миу миу.txt index e69de29..aadcb47 100644 --- a/works/lab-01/миу миу.txt +++ b/works/lab-01/миу миу.txt @@ -0,0 +1,65 @@ +using System; + +class Program +{ + static void Main() + { + /* Console.WriteLine("=== Leveling up a Pokemon ==="); + + // запрос базовой атаки + Console.Write("Enter the Pokemon's base attack value: "); + int Attack = int.Parse(Console.ReadLine()); + + // запрос количества полученных уровней + Console.Write("Enter the number of levels gained: "); + int level = int.Parse(Console.ReadLine()); + + // расчёт итоговой атаки + int finalAttack = Attack + (level * 5); + + Console.WriteLine($"Pokemon's final attack: {finalAttack}"); + + + // баланс тренера + int balans = 1500; + Console.Write($" trainer's current balance: {balans}"); + + //стоимость зелья + int potion = 200; + + //скок зельев хочешь то емае + Console.Write("How many potions did you buy?: "); + int quantity = int.Parse(Console.ReadLine()); + Console.WriteLine($"you bought: {quantity} potion"); + + //формула пока не один, но тоже сойдет + int by = potion * quantity; + int konec = balans - by; + Console.WriteLine($"You got a good one: {quantity} potion, and there remained {konec} money"); +*/ + //запрос хэпэ + Console.Write("Enter HP: "); + int hp = int.Parse(Console.ReadLine()); + Console.WriteLine($"HP: {hp}"); + + if (hp <= 0) + { + Console.WriteLine("The Pokemon fainted! Return it to its Poke Ball."); + } + else if (hp >= 1 && hp <= 20) + { + Console.WriteLine("Critical condition! Use a potion immediately!"); + } + else if (hp >= 21 && hp <= 50) + { + Console.WriteLine("The Pokemon is injured; be careful."); + } + else + { + Console.WriteLine("The Pokemon is full of energy and ready for battle!"); + } + + + + } +} \ No newline at end of file