diff --git a/works/lab-02/lesson4/lesson4.sln b/works/lab-02/lesson4/lesson4.sln new file mode 100644 index 0000000..cff000a --- /dev/null +++ b/works/lab-02/lesson4/lesson4.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lesson4", "lesson4\lesson4.csproj", "{A3079F49-BE78-4B32-A983-6C04D045083B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A3079F49-BE78-4B32-A983-6C04D045083B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3079F49-BE78-4B32-A983-6C04D045083B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3079F49-BE78-4B32-A983-6C04D045083B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3079F49-BE78-4B32-A983-6C04D045083B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/works/lab-02/lesson4/lesson4/Program.cs b/works/lab-02/lesson4/lesson4/Program.cs new file mode 100644 index 0000000..12cffe3 --- /dev/null +++ b/works/lab-02/lesson4/lesson4/Program.cs @@ -0,0 +1,12 @@ +namespace lesson4; + +class Program +{ + static void Main(string[] args) + { + string[] activeTeam = new string[3]; + Console.WriteLine("РЕГИСТРАЦИЯ КОМАНДЫ\n"); + activeTeam[0] = Console.ReadLine(); + } + +} \ No newline at end of file diff --git a/works/lab-02/lesson4/lesson4/lesson4.csproj b/works/lab-02/lesson4/lesson4/lesson4.csproj new file mode 100644 index 0000000..6c1dc92 --- /dev/null +++ b/works/lab-02/lesson4/lesson4/lesson4.csproj @@ -0,0 +1,10 @@ + + + + Exe + net10.0 + enable + enable + + + diff --git a/works/lab-04/ConsoleApp1/ConsoleApp1.sln b/works/lab-04/ConsoleApp1/ConsoleApp1.sln new file mode 100644 index 0000000..a3ee9a8 --- /dev/null +++ b/works/lab-04/ConsoleApp1/ConsoleApp1.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{5BA785FD-F135-4D2D-95DA-E69D395AB140}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5BA785FD-F135-4D2D-95DA-E69D395AB140}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5BA785FD-F135-4D2D-95DA-E69D395AB140}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5BA785FD-F135-4D2D-95DA-E69D395AB140}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5BA785FD-F135-4D2D-95DA-E69D395AB140}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/works/lab-04/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj b/works/lab-04/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj new file mode 100644 index 0000000..6c1dc92 --- /dev/null +++ b/works/lab-04/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj @@ -0,0 +1,10 @@ + + + + Exe + net10.0 + enable + enable + + + diff --git a/works/lab-04/ConsoleApp1/ConsoleApp1/Program.cs b/works/lab-04/ConsoleApp1/ConsoleApp1/Program.cs new file mode 100644 index 0000000..c7ba02b --- /dev/null +++ b/works/lab-04/ConsoleApp1/ConsoleApp1/Program.cs @@ -0,0 +1,9 @@ +namespace ConsoleApp1; + +class Program +{ + static void Main(string[] args) + { + Console.WriteLine("Hello, World!"); + } +} \ No newline at end of file diff --git a/works/lab-05/lab-05.sln b/works/lab-05/lab-05.sln new file mode 100644 index 0000000..e441ddb --- /dev/null +++ b/works/lab-05/lab-05.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lab-05", "lab-05\lab-05.csproj", "{F58B28FA-A9CC-4F57-AE47-60682018140F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F58B28FA-A9CC-4F57-AE47-60682018140F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F58B28FA-A9CC-4F57-AE47-60682018140F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F58B28FA-A9CC-4F57-AE47-60682018140F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F58B28FA-A9CC-4F57-AE47-60682018140F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/works/lab-05/lab-05/Program.cs b/works/lab-05/lab-05/Program.cs new file mode 100644 index 0000000..cf60b84 --- /dev/null +++ b/works/lab-05/lab-05/Program.cs @@ -0,0 +1,54 @@ +using System; + +namespace LaboratoryWork5 +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("=== ПОКЕЦЕНТР: ЛЕЧЕНИЕ ==="); + int pokemonHP = 20; + Console.WriteLine($"Здоровье до лечения: {pokemonHP} HP."); + HealPokemon(ref pokemonHP); + Console.WriteLine($"Здоровье после лечения: {pokemonHP} HP."); + + Console.WriteLine("\n=== ИССЛЕДОВАНИЕ ЛОКАЦИИ ==="); + string foundPokemon; + int pokemonLevel; + SearchBushes(out foundPokemon, out pokemonLevel); + + Console.WriteLine("\n=== РЕГИСТРАЦИЯ НА ТУРНИР ==="); + double stadiumDifficulty = 1.5; + RegisterTournament(in stadiumDifficulty, "Булбазавр", "Чармандер"); + Console.WriteLine("-----------------------------"); + RegisterTournament(in stadiumDifficulty, "Сквиртл", "Пикачу", "Псайдак", "Мяут"); + Console.WriteLine("============================="); + } + + static void HealPokemon(ref int hp) + { + hp += 80; + Console.WriteLine("[Покецентр] Покемон полностью здоров! Восстановлено 80 HP."); + } + + static void SearchBushes(out string foundPokemon, out int pokemonLevel) + { + Random rand = new Random(); + foundPokemon = "Пикачу"; + pokemonLevel = rand.Next(1, 16); + + Console.WriteLine("Вы зашли в высокую траву..."); + Console.WriteLine($"Шорох! Из кустов появляется дикий {foundPokemon} (Уровень: {pokemonLevel})!"); + } + + static void RegisterTournament(in double difficulty, params string[] participants) + { + Console.WriteLine($"Коэффициент стадиона: {difficulty}"); + Console.WriteLine("Список участников:"); + foreach (string pokemon in participants) + { + Console.WriteLine($" * {pokemon}"); + } + } + } +} \ No newline at end of file diff --git a/works/lab-05/lab-05/lab-05.csproj b/works/lab-05/lab-05/lab-05.csproj new file mode 100644 index 0000000..d4ff536 --- /dev/null +++ b/works/lab-05/lab-05/lab-05.csproj @@ -0,0 +1,11 @@ + + + + Exe + net10.0 + lab_05 + enable + enable + + +