From 6cdbb49facb21677e409850aca34f630a50e4852 Mon Sep 17 00:00:00 2001 From: Rulet13 Date: Thu, 3 Sep 2026 14:07:47 +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/lab-02/Readme.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- works/lab-02/Readme.md | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/works/lab-02/Readme.md b/works/lab-02/Readme.md index 9756237..efd2996 100644 --- a/works/lab-02/Readme.md +++ b/works/lab-02/Readme.md @@ -1,6 +1,6 @@ # Лабораторная работа №2 -* **Студент:** [ФИО] +* **Студент:** [Тимонина Э.С.] * **Вариант / Карточка:** [Например: #025 Pikachu] --- @@ -8,8 +8,33 @@ ## Ключевой код ```csharp // Самая важная часть реализации (методы, структуры, логика) -public class Card -{ - public string Name { get; set; } - public int Hp { get; set; } +using System; + +class lab2 { + static void Main(string[] args) + { + Console.OutputEncoding = System.Text.Encoding.UTF8; + string trainerName, regionName, pokemonName, elementType; + trainerName = regionName = pokemonName = elementType = string.Empty; + try + { + Console.Write("Введите имя тренера: "); + Console.WriteLine(trainerName = Convert.ToString(Console.ReadLine())); + Console.Write("Введите имя покемона: "); + Console.WriteLine(pokemonName = Convert.ToString(Console.ReadLine())); + Console.Write("Введите стихию: "); + Console.WriteLine(elementType = Convert.ToString(Console.ReadLine())); + Console.Write("Введите регион: "); + Console.WriteLine(regionName = Convert.ToString(Console.ReadLine())); + } + catch + { + Console.WriteLine("НЕВЕРНЫЙ ФОРМАТ ВВОДА"); + } + Console.WriteLine("\n*****************************************"); + Console.WriteLine(" ПАСПОРТ ПОКЕМОН"); + Console.WriteLine($"Тренер: {trainerName} (Регион: {regionName})"); + Console.WriteLine($"Покемон: {pokemonName} [Стихия: {elementType}]"); + Console.WriteLine("*****************************************"); + } }