This commit is contained in:
zxc
2026-10-09 13:09:08 +03:00
parent 91ea5776ad
commit e7a1ff6588
70 changed files with 0 additions and 3374 deletions
-60
View File
@@ -1,60 +0,0 @@
using System;
{
class Program
{
static void Main(string[] args)
{
// ЗАДАНИЕ 1
Console.WriteLine("=== ПОКЕЦЕНТР: ЛЕЧЕНИЕ ===");
int pokemonHP = 20;
Console.WriteLine($"Здоровье до лечения: {pokemonHP} HP.");
HealPokemon(ref pokemonHP);
Console.WriteLine($"Здоровье после лечения: {pokemonHP} HP.");
Console.WriteLine();
static void HealPokemon(ref int hp)
{
hp += 80;
Console.WriteLine($"[Покецентр] Покемон полностью здоров! Восстановлено 80 HP.");
Console.WriteLine($"[Покецентр] Покемон полностью здоров! Восстановлено {healed} HP.");
}
// ЗАДАНИЕ 2
Console.WriteLine("=== ИССЛЕДОВАНИЕ ЛОКАЦИИ ===");
Console.WriteLine("Вы зашли в высокую траву...");
SearchBushes(out string foundPokemon, out int pokemonLevel);
Console.WriteLine($"Шорох! Из кустов появляется дикий {foundPokemon} (Уровень: {pokemonLevel})!");
Console.WriteLine();
static void SearchBushes(out string foundPokemon, out int pokemonLevel)
{
Random rnd = new Random();
foundPokemon = "Пикачу";
pokemonLevel = rnd.Next(1, 16);
}
// ЗАДАНИЕ 3
Console.WriteLine("=== РЕГИСТРАЦИЯ НА ТУРНИР ===");
double difficulty = 1.5;
RegisterTournament(in difficulty, "Булбазавр", "Чармандер");
Console.WriteLine("-----------------------------");
RegisterTournament(in difficulty, "Сквиртл", "Пикачу", "Псайдак", "Мяут");
Console.WriteLine("=============================");
Console.ReadLine();
}
static void RegisterTournament(in double difficulty, params string[] participants)
{
Console.WriteLine($"Коэффициент стадиона: {difficulty}");
Console.WriteLine("Список участников:");
foreach (string p in participants)
{
Console.WriteLine($" * {p}");
}
}
}
}