done ex. 2.1

This commit is contained in:
2026-09-07 22:31:07 +03:00
parent 831b178b07
commit 3b70da9bcf
+18 -1
View File
@@ -4,6 +4,23 @@ public class lab2_2_1
{
static void Main(string[] args)
{
int x = 10;
int hp = int.Parse(Console.ReadLine());
if (hp >= 50)
{
Console.WriteLine("Покемон полон сил и готов к бою!");
}
else if (hp >= 21 && hp <= 50)
{
Console.WriteLine("Покемон ранен, будьте осторожны.");
}
else if (hp >= 1 && hp <= 20)
{
Console.WriteLine("Критическое состояние! Срочно используйте зелье!");
}
else
{
Console.WriteLine("Покемон потерял сознание! Верните его в покебол.");
}
}
}