Files
Prog-Samoilov/works/Charp/lab-01
2026-09-09 11:11:43 +03:00
..
2026-09-09 11:11:43 +03:00

Тема: Введение в язык C#. Переменные, базовые типы данных и консольный ввод/вывод информации

//ex 1
string pokemoneName = "Чармандер";
string elementType = "Огонь";
int level = 1;
int hp = 95;

Console.WriteLine($"=== БАЗА ДАННЫХ ПОКЕМОНОВ ===\nПокемон: {pokemoneName}\nСтихия: {elementType}\nУровень: {level} | HP: {hp}");



//ex 2 
Console.Write("Введите имя тренера: ");
		string trainerName = Console.ReadLine();

		Console.Write("Введите имя покемона: ");
		string pokemonName = Console.ReadLine();

		Console.Write("Введите стихию: ");
		string 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("****************************************");