Добавил новые работы

This commit is contained in:
gcn
2026-11-25 11:25:37 +03:00
parent b06b1acf69
commit 2b1f86a4a5
219 changed files with 6971 additions and 45 deletions
+2 -42
View File
@@ -1,43 +1,3 @@
Console.WriteLine("=== ЗАДАНИЕ 1. ===");
int pokemonHp = 20;
Console.WriteLine("=== ПОКЕЦЕНТР: ЛЕЧЕНИЕ ===");
Console.WriteLine($"Здоровье до лечения: {pokemonHp}.");
static void HealPokemon(ref int pokemonHp)
{
pokemonHp += 80;
Console.WriteLine("[Покецентр] Покемон полностью здоров! Восстановлено 80 HP.");
}
HealPokemon(ref pokemonHp);
Console.WriteLine($"Здоровье после лечения: {pokemonHp}.");
zя
Console.WriteLine("\n=== ЗАДАНИЕ 2. ===");
Console.WriteLine("=== ИССЛЕДОВАНИЕ ЛОКАЦИИ ===");
Console.WriteLine($"Вы зашли в высокую траву...");
static void SearchBushes(out string foundPokemon, out int pokemonLevel)
{
foundPokemon = "Пикачу";
pokemonLevel = new Random().Next(1, 15);
}
SearchBushes(out string pokemonName, out int level);
Console.WriteLine($"Шорох! Из кустов появляется дикий {pokemonName}, (Уровень: {level})");
Console.WriteLine("\n=== ЗАДАНИЕ 3. ===");
static void RegisterTournament(in double difficulty, params string[] participants)
{
// difficulty = 2.0; // компилятор выдаст ошибку
Console.WriteLine($"Коэффициент стадиона: {difficulty}");
Console.WriteLine("Список участников:");
foreach (string pokemon in participants)
{
Console.WriteLine($"* {pokemon}");
}
}
Console.WriteLine("=== РЕГИСТРАЦИЯ НА ТУРНИР ===");
RegisterTournament(1.5, "Бульбазавр", "Чармандер");
Console.WriteLine("-----------------------------");
RegisterTournament(1.5, "Сквиртл", "Пикачу", "Псайдак", "Мяут");
Console.WriteLine("=============================");
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("lab05")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b2b220fcfe2b10727e8ca891ca0e8f7ee7957a3a")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+54e3f5c046ac59e48184b09e90c891762d1767f1")]
[assembly: System.Reflection.AssemblyProductAttribute("lab05")]
[assembly: System.Reflection.AssemblyTitleAttribute("lab05")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
@@ -1 +1 @@
98b21de21940183d1a3f4f9f8fe3d18ee9be527fe7cf2b34c22b5523a0f16e8e
ddf6cbce46764d46c3bcf914dbe4a8290a80da6e6fe01d77604bd3dfde2fe542
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
17908431847805291
17921524531224568