From 80af2da780970d4972f4cbbd6d5d2ab436147422 Mon Sep 17 00:00:00 2001 From: 328p <328p@BTK.MAIN> Date: Thu, 3 Sep 2026 16:53:03 +0300 Subject: [PATCH] =?UTF-8?q?stage=202=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- works/lab-01/Новый текстовый документ.txt | 1 - works/lab-01/Стадия 2.cs | 62 +++++++++++++++++++++++ works/lab-01/Урок 1.cs | 45 ++++++++++++++++ 3 files changed, 107 insertions(+), 1 deletion(-) delete mode 100644 works/lab-01/Новый текстовый документ.txt create mode 100644 works/lab-01/Стадия 2.cs create mode 100644 works/lab-01/Урок 1.cs diff --git a/works/lab-01/Новый текстовый документ.txt b/works/lab-01/Новый текстовый документ.txt deleted file mode 100644 index 490d8fa..0000000 --- a/works/lab-01/Новый текстовый документ.txt +++ /dev/null @@ -1 +0,0 @@ -fdfdfdssgsg \ No newline at end of file diff --git a/works/lab-01/Стадия 2.cs b/works/lab-01/Стадия 2.cs new file mode 100644 index 0000000..352778a --- /dev/null +++ b/works/lab-01/Стадия 2.cs @@ -0,0 +1,62 @@ +using System; + +class Program +{ + static void Main() + { + int hp = 60; + int number = 25; + double height = 0.4; + double weight = 6.0; + int attack2Damage = 20; + int retreatCost = 1; + + // Ввод данных от пользователя + Console.Write("Введите стадию развития: "); + string stage = Console.ReadLine(); + + Console.Write("Введите имя покемона: "); + string name = Console.ReadLine(); + + Console.Write("Введите вид покемона: "); + string category = Console.ReadLine(); + + Console.Write("Введите название первой атаки: "); + string attack1Name = Console.ReadLine(); + + Console.Write("Введите эффект первой атаки: "); + string attack1Desc = Console.ReadLine(); + + Console.Write("Введите название второй атаки: "); + string attack2Name = Console.ReadLine(); + + Console.Write("Введите эффект второй атаки: "); + string attack2Desc = Console.ReadLine(); + + Console.Write("Введите уязвимость (например, Боевой x2): "); + string weakness = Console.ReadLine(); + + Console.Write("Введите устойчивость (например, Стальной -20): "); + string resistance = Console.ReadLine(); + + Console.WriteLine("======================================================================"); + Console.WriteLine($"[БАЗА] {name,-50} ОЖ: {hp} [⚡]"); + Console.WriteLine("----------------------------------------------------------------------"); + + Console.WriteLine($"№ {number:D3} | Вид: {category} | Рост: {height} м | Вес: {weight} кг"); + Console.WriteLine("----------------------------------------------------------------------"); + + Console.WriteLine($"[Атака 1] {attack1Name}"); + Console.WriteLine($"Эффект: {attack1Desc}"); + Console.WriteLine(); + + Console.WriteLine($"[Атака 2] {attack2Name,-50} Урон: {attack2Damage}+"); + Console.WriteLine($"Эффект: {attack2Desc}"); + Console.WriteLine("----------------------------------------------------------------------"); + + Console.WriteLine($"Слабость: {weakness}"); + Console.WriteLine($"Устойчивость: {resistance}"); + Console.WriteLine($"Отступление: {retreatCost} энергия"); + Console.WriteLine("======================================================================"); + } +} diff --git a/works/lab-01/Урок 1.cs b/works/lab-01/Урок 1.cs new file mode 100644 index 0000000..5a8877d --- /dev/null +++ b/works/lab-01/Урок 1.cs @@ -0,0 +1,45 @@ +using System; + +class Program { + + static void Main() + { + //ЗАДАНИЕ 1 + //string pokemonName = "Пикачу"; + //string elementType = "Электричество"; + //int level = 1; + //int hp = 175; + +//Console.WriteLine($"=== БАЗА ДАННЫХ ПОКЕМОНОВ ==="); +//Console.WriteLine($"Покемон: {pokemonName}"); +//Console.WriteLine($"Элемент: {elementType}"); +//Console.WriteLine($"Уровень: {level}"); +//Console.WriteLine($"Хп: {hp}"); + + + Console.Write("Введите имя тренера?\n"); + string trainerName = Console.ReadLine(); + + Console.Write("Как зовут покемона?\n"); + string pokemonName = Console.ReadLine(); + + Console.Write("Какой элемент у покемона?\n"); + string elementType = Console.ReadLine(); + + Console.Write("Из какого региона покемон?\n"); + string regionName = Console.ReadLine(); + + Console.WriteLine("========================================"); + Console.WriteLine(" ПАСПОРТ ПОКЕМОНА "); + + + + Console.WriteLine($"Тренер: {trainerName}"); + Console.WriteLine($"Покемон:{pokemonName}"); + Console.WriteLine($"Стихия: {elementType}"); + Console.WriteLine($"Регион: {regionName}"); + + Console.WriteLine("========================================"); + } + +} \ No newline at end of file