generated from admin/template
lab5
This commit is contained in:
@@ -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
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -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
|
||||
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace ConsoleApp1;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello, World!");
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>lab_05</RootNamespace>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user