vpetrov 10 bulan lalu
melakukan
8e5a5a796d

+ 4 - 0
.gitignore

@@ -0,0 +1,4 @@
+*/bin/
+*/obj/
+.vs/
+packages/

+ 13 - 0
.idea/.idea.ConsoleApp1/.idea/.gitignore

@@ -0,0 +1,13 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Rider ignored files
+/modules.xml
+/contentModel.xml
+/projectSettingsUpdater.xml
+/.idea.ConsoleApp1.iml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml

+ 4 - 0
.idea/.idea.ConsoleApp1/.idea/encodings.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
+</project>

+ 8 - 0
.idea/.idea.ConsoleApp1/.idea/indexLayout.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="UserContentModel">
+    <attachedFolders />
+    <explicitIncludes />
+    <explicitExcludes />
+  </component>
+</project>

+ 7 - 0
.idea/.idea.ConsoleApp1/.idea/vcs.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+    <mapping directory="$PROJECT_DIR$/ConsoleApp1" vcs="Git" />
+  </component>
+</project>

+ 16 - 0
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", "{3B39C42F-B1D1-4529-B42D-EA93D24DBFFE}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{3B39C42F-B1D1-4529-B42D-EA93D24DBFFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{3B39C42F-B1D1-4529-B42D-EA93D24DBFFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{3B39C42F-B1D1-4529-B42D-EA93D24DBFFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{3B39C42F-B1D1-4529-B42D-EA93D24DBFFE}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+EndGlobal

+ 4 - 0
ConsoleApp1/.idea/.idea.ConsoleApp1.dir/.idea/encodings.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
+</project>

+ 8 - 0
ConsoleApp1/.idea/.idea.ConsoleApp1.dir/.idea/indexLayout.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="UserContentModel">
+    <attachedFolders />
+    <explicitIncludes />
+    <explicitExcludes />
+  </component>
+</project>

+ 6 - 0
ConsoleApp1/.idea/.idea.ConsoleApp1.dir/.idea/projectSettingsUpdater.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="RiderProjectSettingsUpdater">
+    <option name="vcsConfiguration" value="2" />
+  </component>
+</project>

+ 39 - 0
ConsoleApp1/.idea/.idea.ConsoleApp1.dir/.idea/workspace.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ChangeListManager">
+    <list default="true" id="cf28587b-ccd1-42c4-9911-87dbc49d018a" name="Changes" comment="" />
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="ProjectColorInfo"><![CDATA[{
+  "associatedIndex": 5
+}]]></component>
+  <component name="ProjectId" id="2bJnaWOomkaOyaaF8VQkPm7wqhp" />
+  <component name="ProjectViewState">
+    <option name="hideEmptyMiddlePackages" value="true" />
+    <option name="showLibraryContents" value="true" />
+  </component>
+  <component name="PropertiesComponent"><![CDATA[{
+  "keyToString": {
+    "RunOnceActivity.OpenProjectViewOnStart": "true",
+    "RunOnceActivity.ShowReadmeOnStart": "true",
+    "nodejs_package_manager_path": "npm"
+  }
+}]]></component>
+  <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="cf28587b-ccd1-42c4-9911-87dbc49d018a" name="Changes" comment="" />
+      <created>1705942124020</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1705942124020</updated>
+    </task>
+    <servers />
+  </component>
+  <component name="VcsManagerConfiguration">
+    <option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
+  </component>
+</project>

+ 10 - 0
ConsoleApp1/ConsoleApp1.csproj

@@ -0,0 +1,10 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+    <PropertyGroup>
+        <OutputType>Exe</OutputType>
+        <TargetFramework>net8.0</TargetFramework>
+        <ImplicitUsings>enable</ImplicitUsings>
+        <Nullable>enable</Nullable>
+    </PropertyGroup>
+
+</Project>

+ 116 - 0
ConsoleApp1/Program.cs

@@ -0,0 +1,116 @@
+/// Задание 1
+
+Console.WriteLine("Задание ``Мышка``");
+Console.Write("Введите ширину, высоту ковра и радиус >>> ");
+
+var inp = Console.ReadLine();
+var inp_list = inp.Split(' ');
+int a = Convert.ToInt32(inp_list[0]);
+int b = Convert.ToInt32(inp_list[1]);
+int c = Convert.ToInt32(inp_list[2]);
+
+if (a >= c & b < c)
+{
+    Console.WriteLine("YES");
+}
+else if (a < c || b < c)
+{
+    Console.WriteLine("NO");
+}
+
+
+/// Задание 2
+
+Console.WriteLine("Задание ``A+B``");
+Console.Write("Введите два целых числа >>> ");
+
+var Inp = Console.ReadLine();
+var num1 = Inp.Split()[0];
+var num2 = Inp.Split()[1];
+int plus = int.Parse(num1);
+int plus2 = int.Parse(num2);
+double res = Math.Pow(10, 9);
+
+if (plus+plus2 <= res)
+{
+    Console.WriteLine(plus + plus2);
+}
+else
+{
+    Console.WriteLine("Ошибка");
+}
+
+/// Задание 3
+
+Console.WriteLine("Задание ``Больше-Меньше``");
+Console.Write("Введите целые числа >>> ");
+
+var ab = Console.ReadLine();
+int ac = int.Parse(ab.Split()[0]);
+int ad = int.Parse(ab.Split()[1]);
+double numd = 2 * Math.Pow(10, 9);
+if (ac <= numd & ad <= numd)
+{
+    if (ac < ad)
+    {
+        Console.WriteLine("<");
+    }
+    else if (ac == ad)
+    {
+        Console.WriteLine("=");
+    }
+    else
+    {
+        Console.WriteLine(">");
+    }
+}
+
+/// Задание 4
+
+Console.WriteLine("Задание ``Ремонт``");
+Console.Write("Введите длину, ширину и высоту офиса >>> ");
+var zn = Console.ReadLine();
+int L = int.Parse(zn.Split()[0]);
+int W = int.Parse(zn.Split()[1]);
+int H = int.Parse(zn.Split()[2]);
+int P = 2*(L*H)+2*(W*H);
+if (P / 16 <= 0)
+{
+    Console.WriteLine(1);
+}
+else
+{
+    Console.WriteLine(P/16);
+}
+
+/// Задание 5
+
+Console.WriteLine("Задание ``Три толстяка``");
+Console.Write("Введите вес всех трех жиробасов >>> ");
+var zhir_res = Console.ReadLine();
+int zhirobas1 = int.Parse(zhir_res.Split()[0]);
+int zhirobas2 = int.Parse(zhir_res.Split()[1]);
+int zhirobas3 = int.Parse(zhir_res.Split()[2]);
+if (zhirobas1 > 757 || zhirobas2 > 757 || zhirobas3 > 757)
+{
+    Console.WriteLine("Error");
+}
+else if (zhirobas1 < 94 || zhirobas2 < 94 || zhirobas3 <  94)
+{
+    Console.WriteLine("Error");
+}
+else
+{
+    if (zhirobas1 > zhirobas2 & zhirobas1 > zhirobas3)
+    {
+        Console.WriteLine(zhirobas1);
+    }
+    if (zhirobas2 > zhirobas1 & zhirobas2 > zhirobas3)
+    {
+        Console.WriteLine(zhirobas2);
+    }
+    else
+    {
+        Console.WriteLine(zhirobas3);
+    }
+}

+ 13 - 0
README.md

@@ -0,0 +1,13 @@
+```
+***Задача:*** [Мышка](https://acmp.ru/index.asp?main=task&id_task=907)
+
+Задание №1 "Мышка" -> 123 99 212 -> NO
+
+
+
+
+Задание №2 "А+В" -> 12 43 -> 55
+Задание №3 "Больше-Меньше" -> 123 543 -> "<"
+Задание №4 "Ремонт" -> 12 9 4 -> 10
+Задание №5 "Три толстяка" -> 140 132 444 -> 444
+```