From 91ed8258d0574bfe9464fc4c470c306b65eb601f Mon Sep 17 00:00:00 2001 From: Katy328 Date: Wed, 23 Sep 2026 08:15:51 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=BA=D1=82=D0=B8=D1=87?= =?UTF-8?q?=D0=B5=D1=81=D0=BA=D0=B0=D1=8F=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- works/lab-01/Lab1.csproj | 10 ++++ works/lab-01/Lab1.sln | 16 +++++++ works/lab-01/Program.cs | 98 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 works/lab-01/Lab1.csproj create mode 100644 works/lab-01/Lab1.sln create mode 100644 works/lab-01/Program.cs diff --git a/works/lab-01/Lab1.csproj b/works/lab-01/Lab1.csproj new file mode 100644 index 0000000..7ca9552 --- /dev/null +++ b/works/lab-01/Lab1.csproj @@ -0,0 +1,10 @@ + + + + Exe + net10.0 + enable + enable + + + diff --git a/works/lab-01/Lab1.sln b/works/lab-01/Lab1.sln new file mode 100644 index 0000000..4b3fa07 --- /dev/null +++ b/works/lab-01/Lab1.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lab1", "Lab1\Lab1.csproj", "{3D7DF60E-81A6-47B5-9123-A52C30868874}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3D7DF60E-81A6-47B5-9123-A52C30868874}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3D7DF60E-81A6-47B5-9123-A52C30868874}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D7DF60E-81A6-47B5-9123-A52C30868874}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3D7DF60E-81A6-47B5-9123-A52C30868874}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/works/lab-01/Program.cs b/works/lab-01/Program.cs new file mode 100644 index 0000000..7109093 --- /dev/null +++ b/works/lab-01/Program.cs @@ -0,0 +1,98 @@ +/*string pokemonName = "Чармандер"; +string elementType = "Огонь"; +int level = 1; +int hp = 95; +Console.WriteLine("=== БАЗА ДАННЫХ ПОКЕМОНОВ ==="); +Console.WriteLine($"Покемон: {pokemonName}"); +Console.WriteLine($"Стихия: {elementType}"); +Console.WriteLine($"Уровень: {level} | HP: {hp}"); + +Console.WriteLine("=== Интерактивный ввод и динамическое формирование документов ==="); + +Console.Write("Введите имя тренера:"); +string trainerName = Console.ReadLine(); + +Console.Write("Введите имя покемона: "); +string pokemonName = Console.ReadLine(); + +Console.Write("Введите стихию: "); +string elementType = Console.ReadLine(); + +Console.Write("Введите регион: "); +string regionName = Console.ReadLine(); + +Console.WriteLine("****************************************"); +Console.WriteLine("ПАСПОРТ ПОКЕМОНА"); +Console.WriteLine($"Тренер: {trainerName} (Регион: {regionName})"); +Console.WriteLine($"Покемон: {pokemonName} [Стихия: {elementType}]"); +Console.WriteLine("****************************************");*/ + +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("Введите уязвимость "); +string weakness = Console.ReadLine(); + +Console.Write("Введите устойчивость "); +string resistance = Console.ReadLine(); +string elementSymbol = "⚡"; + +int hp = 60; +int number = 25; +double height = 0.4; +double weight = 6.0; +int attack2Damage = 20; +int retreatCost = 1; + +Console.Clear(); + +Console.WriteLine("======================================================================"); + + +string headerLeft = $"[{stage}] {name}"; +string headerRight = $"ОЖ: {hp} [{elementSymbol}]"; + +Console.WriteLine(headerLeft.PadRight(70 - headerRight.Length) + headerRight); + +Console.WriteLine("----------------------------------------------------------------------"); +Console.WriteLine($"№ {number} | Вид: {category} | Рост: {height} м | Вес: {weight} кг"); +Console.WriteLine("----------------------------------------------------------------------"); + + +Console.WriteLine($"[{attack1Name}]"); +Console.WriteLine($"Эффект: {attack1Desc}"); +Console.WriteLine(); + + +string attack2Left = $"[{attack2Name}]"; +string attack2Right = $"Урон: {attack2Damage}"; +Console.WriteLine(attack2Left.PadRight(70 - attack2Right.Length) + attack2Right); +Console.WriteLine($"Эффект: {attack2Desc}"); + +Console.WriteLine("----------------------------------------------------------------------"); +Console.WriteLine($"Слабость: {weakness}"); +Console.WriteLine($"Устойчивость: {resistance}"); +Console.WriteLine($"Отступление: {retreatCost}"); +Console.WriteLine("======================================================================"); + + + +