Загрузить файлы в «works/lab-01»
This commit is contained in:
@@ -0,0 +1,37 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
class Program {
|
||||||
|
static void Main() {
|
||||||
|
//Задание 1 - Объявление переменных и статический вывод данных
|
||||||
|
//string pokemonName = "Чармандер";
|
||||||
|
//string elementType = "Огонь";
|
||||||
|
//int level = 1;
|
||||||
|
//int hp = 95;
|
||||||
|
|
||||||
|
//Console.WriteLine($"=== БАЗА ДАННЫХ ПОКЕМОНОВ ===");
|
||||||
|
//Console.WriteLine($"Покемон: {pokemonName}");
|
||||||
|
//Console.WriteLine($"Стихия: {elementType}");
|
||||||
|
//Console.WriteLine($"Уровень: {level} | HP: {hp}");
|
||||||
|
//Console.ReadLine();
|
||||||
|
|
||||||
|
|
||||||
|
//Задание 2 - Интерактивный ввод и динамическое формирование документов
|
||||||
|
Console.Write("Введите имя тренера: \n");
|
||||||
|
string trainerName = Console.ReadLine();
|
||||||
|
|
||||||
|
Console.Write("Введите имя покемона: \n");
|
||||||
|
string pokemonName = Console.ReadLine();
|
||||||
|
|
||||||
|
Console.Write("Введите стихию: \n");
|
||||||
|
string elementType = Console.ReadLine();
|
||||||
|
|
||||||
|
Console.Write("Введите регион: \n");
|
||||||
|
string regionName = Console.ReadLine();
|
||||||
|
|
||||||
|
Console.WriteLine("****************************************");
|
||||||
|
Console.WriteLine("ПАСПОРТ ПОКЕМОНА");
|
||||||
|
Console.WriteLine($"Тренер: {trainerName} (Регион: {regionName})");
|
||||||
|
Console.WriteLine($"Покемон: {pokemonName} [Стихия: {elementType}]");
|
||||||
|
Console.WriteLine("****************************************");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
class Program {
|
||||||
|
static void Main() {
|
||||||
|
Console.Write("Введите стадию развития: \n");
|
||||||
|
string stage = Console.ReadLine();
|
||||||
|
|
||||||
|
Console.Write("Введите имя покемона: \n");
|
||||||
|
string name = Console.ReadLine();
|
||||||
|
|
||||||
|
Console.Write("Введите вид покемона: \n");
|
||||||
|
string category = Console.ReadLine();
|
||||||
|
|
||||||
|
Console.Write("Введите название первой атаки: \n");
|
||||||
|
string attack1Name = Console.ReadLine();
|
||||||
|
|
||||||
|
Console.Write("Введите эффект первой атаки: \n");
|
||||||
|
string attack1Desc = Console.ReadLine();
|
||||||
|
|
||||||
|
Console.Write("Введите название второй атаки: \n");
|
||||||
|
string attack2Name = Console.ReadLine();
|
||||||
|
|
||||||
|
Console.Write("Введите эффект второй атаки: \n");
|
||||||
|
string attack2Desc = Console.ReadLine();
|
||||||
|
|
||||||
|
Console.Write("Введите уязвимость: \n");
|
||||||
|
string weakness = Console.ReadLine();
|
||||||
|
|
||||||
|
Console.Write("Введите устойчивость: \n\n\n");
|
||||||
|
string resistance = Console.ReadLine();
|
||||||
|
|
||||||
|
int hp = 60;
|
||||||
|
int number = 25;
|
||||||
|
double height = 0.4;
|
||||||
|
double weight = 6.0;
|
||||||
|
int attack2Damage = 20;
|
||||||
|
int retreatCost = 1;
|
||||||
|
|
||||||
|
Console.Clear();
|
||||||
|
|
||||||
|
Console.WriteLine("======================================================================");
|
||||||
|
Console.WriteLine($"[{stage}] {name, -42} ОЖ: {hp} [⚡]");
|
||||||
|
Console.WriteLine("----------------------------------------------------------------------");
|
||||||
|
Console.WriteLine($"№ 0{number} | Вид: {category} | Рост: {height} м | Вес: {weight} кг");
|
||||||
|
Console.WriteLine("----------------------------------------------------------------------");
|
||||||
|
Console.WriteLine($"[Атака 1] {attack1Name}");
|
||||||
|
Console.WriteLine($"Эффект: {attack1Desc}");
|
||||||
|
Console.WriteLine();
|
||||||
|
Console.WriteLine($"[Атака 2] {attack2Name, -35} Урон: {attack2Damage}+");
|
||||||
|
Console.WriteLine($"Эффект: {attack2Desc}");
|
||||||
|
Console.WriteLine("----------------------------------------------------------------------");
|
||||||
|
Console.WriteLine($"Слабость: {weakness}");
|
||||||
|
Console.WriteLine($"Устойчивость: {resistance}");
|
||||||
|
Console.WriteLine($"Отступление: {retreatCost}");
|
||||||
|
Console.WriteLine("======================================================================");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user