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

This commit is contained in:
2026-09-08 09:11:13 +00:00
parent 538215f716
commit 27cac60e37
4 changed files with 97 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
using System;
class Program {
static void Main() {
Console.OutputEncoding = System.Text.Encoding.UTF8;
Console.InputEncoding = System.Text.Encoding.UTF8;
Console.WriteLine("Вашего покемона атаковали!");
Console.WriteLine("Введите сколько у него осталось здоровье! (максимум 50)");
int currentHp = int.Parse(Console.ReadLine());
if (currentHp <= 0)
{
Console.WriteLine("Покемон потерял сознание! Верните его в покебол.");
}
if (currentHp > 1 && currentHp < 21)
{
Console.WriteLine("Критическое состояние! Срочно используйте зелье!");
}
if (currentHp > 20 && currentHp < 50)
{
Console.WriteLine("Покемон ранен, будьте осторожны.");
}
if (currentHp >= 50)
{
Console.WriteLine("Покемон полон сил и готов к бою!");
}
}
}