add c lab

This commit is contained in:
IliyaSomoilov
2026-09-10 12:04:19 +03:00
parent a8bcb9c24a
commit d5a2eedc77
38 changed files with 62 additions and 0 deletions
+70
View File
@@ -0,0 +1,70 @@
//// task 1.1
//Console.WriteLine("=== Прокачка покемона ===");
//Console.Write("Базовая атака: ");
//int damage = int.Parse(Console.ReadLine());
//Console.Write("Уровень: ");
//int lvl = int.Parse(Console.ReadLine());
//int totalDamage = damage + (lvl * 5);
//Console.WriteLine($"----- Итоговая атака -----\n----- {totalDamage} -----");
//// task 1.2
//int balanceTrainer = 1500;
//int potionCost = 200;
//Console.WriteLine($"Баланс тренера: {balanceTrainer}");
//Console.Write("Кол-во зелей: ");
//int amountPotion = int.Parse(Console.ReadLine());
//balanceTrainer -= amountPotion * potionCost;
//Console.WriteLine(balanceTrainer);
//// task 2.1
//int hp = int.Parse(Console.ReadLine());
//if (hp <= 0)
//{
// Console.WriteLine("Покемон потерял сознание! Верните его в покебол.");
//}
//else if (1 <= hp && hp <= 20)
//{
// Console.WriteLine("Критическое состояние! Срочно используйте зелье!");
//}
//else if (21 <= hp && hp <= 50)
//{
// Console.WriteLine("Покемон ранен, будьте осторожны");
//}
//else
//{
// Console.WriteLine("Покемон полон сил и готов к бою!");
//}
//// task 2.2
//Console.WriteLine("1:— Атака \n2:— Инвентарь \n3:— Сменить покемона \n4:— Побег");
//Console.Write("Выбор действий:");
//int num = int.Parse(Console.ReadLine());
//switch (num)
//{
// case 1:
// Console.WriteLine("Покемон наносит быстрый удар");
// break;
// case 2:
// Console.WriteLine("Вы открыли сумку и применили Зелье Лечения.");
// break;
// case 3:
// Console.WriteLine("Вы отозвали покемона и выпустили нового!");
// break;
// case 4:
// Console.WriteLine("Вы успешно сбежали из боя!");
// break;
// default:
// Console.WriteLine("Неизвестная команда! Вы пропустили ход.");
// break;
//}
+11
View File
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>lab_02</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>