generated from admin/template
Обновить works/csharp/lab-01/Program.cs
This commit is contained in:
@@ -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("****************************************");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user