Локальная копия работ

This commit is contained in:
2026-10-16 10:19:16 +03:00
parent 8591a55cd1
commit 0a3f26f6ba
60 changed files with 1726 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("****************************************");
}
}
}
+10
View File
@@ -0,0 +1,10 @@
# Лабораторная работа C# №1
## 📌 Тема
Знакомство с C# и базовый ввод/вывод.
## 📝 Описание
Создание консольного приложения, вывод данных в консоль и считывание ввода.
## 🚀 Код программы
Исходный код расположен в файле Program.cs.