From 373a1d53e65a97b495794cf07881c91e3829e879 Mon Sep 17 00:00:00 2001 From: Rulet13 Date: Thu, 3 Sep 2026 14:35:26 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?works/lab-01=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- works/lab-01/Program.cs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 works/lab-01/Program.cs diff --git a/works/lab-01/Program.cs b/works/lab-01/Program.cs new file mode 100644 index 0000000..31fe575 --- /dev/null +++ b/works/lab-01/Program.cs @@ -0,0 +1,30 @@ +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("*****************************************"); + } +}