From a57000aa4ede9f8cbbc7340359b1533e9f96ea7f Mon Sep 17 00:00:00 2001 From: ArtemSimonov Date: Sat, 5 Sep 2026 21:31:34 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20works/csharp/lab-01/Program.cs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- works/csharp/lab-01/Program.cs | 35 +++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/works/csharp/lab-01/Program.cs b/works/csharp/lab-01/Program.cs index 47a2d8d..7466d63 100644 --- a/works/csharp/lab-01/Program.cs +++ b/works/csharp/lab-01/Program.cs @@ -1,10 +1,39 @@ -namespace Lab01 +namespace Lab01 { internal class Program { static void Main(string[] args) { - Console.WriteLine("Лабораторная работа C# №1"); + // === ЗАДАНИЕ 1. Объявление переменных и статический вывод данных === + string pokemonName = "Чармандер"; + string elementType = "Огонь"; + int level = 1; + int hp = 95; + + Console.WriteLine("=== БАЗА ДАННЫХ ПОКЕМОНОВ ==="); + Console.WriteLine($"Покемон: {pokemonName}"); + Console.WriteLine($"Стихия: {elementType}"); + Console.WriteLine($"Уровень: {level} | HP: {hp}\n"); + + // === ЗАДАНИЕ 2. Интерактивный ввод и динамическое формирование документов === + Console.Write("Введите имя тренера: "); + string trainerName = Console.ReadLine(); + + Console.Write("Введите имя покемона: "); + pokemonName = Console.ReadLine(); + + Console.Write("Введите стихию: "); + elementType = Console.ReadLine(); + + Console.Write("Введите регион: "); + string regionName = Console.ReadLine(); + + Console.WriteLine(); + Console.WriteLine("****************************************"); + Console.WriteLine("ПАСПОРТ ПОКЕМОНА"); + Console.WriteLine($"Тренер: {trainerName} (Регион: {regionName})"); + Console.WriteLine($"Покемон: {pokemonName} [Стихия: {elementType}]"); + Console.WriteLine("****************************************"); } } -} +} \ No newline at end of file