From 6d23bb04ac3276075cf3156d1de636ca45addb01 Mon Sep 17 00:00:00 2001 From: Katy328 Date: Wed, 9 Sep 2026 09:06:45 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?works/lab-02=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- works/lab-02/Program 2.cs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 works/lab-02/Program 2.cs diff --git a/works/lab-02/Program 2.cs b/works/lab-02/Program 2.cs new file mode 100644 index 0000000..f6cba18 --- /dev/null +++ b/works/lab-02/Program 2.cs @@ -0,0 +1,33 @@ +using System; + +class Program +{ + static void Main(string[] args) + { + Console.OutputEncoding = System.Text.Encoding.UTF8; + + Console.Write("Введите текущее количество HP покемона: "); + int hp = int.Parse(Console.ReadLine()); + + Console.WriteLine(); + + if (hp <= 0) + { + Console.WriteLine("Покемон потерял сознание! Верните его в покебол."); + } + else if (hp >= 1 && hp <= 20) + { + Console.WriteLine("Критическое состояние! Срочно используйте зелье!"); + } + else if (hp >= 21 && hp <= 50) + { + Console.WriteLine("Покемон ранен, будьте осторожны."); + } + else + { + Console.WriteLine("Покемон полон сил и готов к бою!"); + } + + Console.ReadKey(); + } +} \ No newline at end of file