Загрузить файлы в «works/lab-02»

This commit is contained in:
2026-09-09 09:06:45 +00:00
parent 3e22df8333
commit 6d23bb04ac
+33
View File
@@ -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();
}
}