generated from admin/template
Загрузить файлы в «works/lab-01»
This commit is contained in:
@@ -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("*****************************************");
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user