This commit is contained in:
2026-09-08 14:47:50 +03:00
parent 4bbd9e5a2c
commit 55d5937b88
12 changed files with 133 additions and 0 deletions
Binary file not shown.
@@ -0,0 +1,27 @@
{
"Version": 1,
"WorkspaceRootPath": "Z:\\prog-radzh\\works\\\u0421sharp\\lab-03\\",
"Documents": [],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{b1e99781-ab81-11d0-b683-00aa00a3ee26}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057}"
}
]
}
]
}
]
}
@@ -0,0 +1,45 @@
{
"Version": 1,
"WorkspaceRootPath": "Z:\\prog-radzh\\works\\\u0421sharp\\lab-03\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{4BC00299-3280-481D-B7A0-50CA070332BF}|lab-03\\lab-03.csproj|z:\\prog-radzh\\works\\\u0441sharp\\lab-03\\lab-03\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4BC00299-3280-481D-B7A0-50CA070332BF}|lab-03\\lab-03.csproj|solutionrelative:lab-03\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 2,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{b1e99781-ab81-11d0-b683-00aa00a3ee26}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057}"
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "Program.cs",
"DocumentMoniker": "Z:\\prog-radzh\\works\\\u0421sharp\\lab-03\\lab-03\\Program.cs",
"RelativeDocumentMoniker": "lab-03\\Program.cs",
"ToolTip": "Z:\\prog-radzh\\works\\\u0421sharp\\lab-03\\lab-03\\Program.cs",
"RelativeToolTip": "lab-03\\Program.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2026-09-07T07:49:17.592Z",
"EditorCaption": ""
}
]
}
]
}
]
}
+16
View File
@@ -0,0 +1,16 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lab-03", "lab-03\lab-03.csproj", "{4BC00299-3280-481D-B7A0-50CA070332BF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4BC00299-3280-481D-B7A0-50CA070332BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4BC00299-3280-481D-B7A0-50CA070332BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4BC00299-3280-481D-B7A0-50CA070332BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4BC00299-3280-481D-B7A0-50CA070332BF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
+34
View File
@@ -0,0 +1,34 @@
// task 1
/*
string pokemon1Name = "Пикачу";
int pokemon1Hp = 50;
int pokemon1Attack = 12;
string pokemon2Name = "Булбазавр";
int pokemon2Hp = 55;
int pokemon2Attack = 10;
int roundNumber = 1;
Console.WriteLine("Приготовьтесь!");
for (int i = 3 ; i >= roundNumber ; i--)
{
Console.WriteLine(i + "...");
Thread.Sleep(1000);
}
Console.WriteLine("=== БОЙ НАЧИНАЕТСЯ ===");
Console.WriteLine($"{pokemon1Name} (HP: {pokemon1Hp} | Атака: {pokemon1Attack}) VS {pokemon2Name} (HP: {pokemon2Hp} | Атака: {pokemon2Attack})");
*/
// task 2
int choice;
Console.Write("Готовы начать бой? (1 - Да, 0 - Нет): ");
do
{
choice = int.Parse(Console.ReadLine());
Console.WriteLine("Некорректная команда! Попробуйте снова.");
} while (choice != 1 && choice != 0);
{
Console.WriteLine("Некорректная команда! Попробуйте снова.");
}
+11
View File
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>lab_03</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>