Выполнены практические задания

This commit is contained in:
IliyaSomoilov
2026-09-10 11:58:01 +03:00
commit 3c8be68666
30 changed files with 715 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
using System;
namespace Lab01
{
internal class Program
{
static void Main(string[] args)
{
// === ЗАДАНИЕ 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("****************************************");
}
}
}