ksergeev 1 month ago
commit
43a4a64ef7
6 changed files with 237 additions and 0 deletions
  1. 3 0
      .gitignore
  2. 177 0
      README.md
  3. 25 0
      wer.sln
  4. 3 0
      wer/.gitignore
  5. 19 0
      wer/Program.cs
  6. 10 0
      wer/wer.csproj

+ 3 - 0
.gitignore

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

+ 177 - 0
README.md

@@ -0,0 +1,177 @@
+Çŕäíčĺ š1
+
+Ęîä:
+using System;
+
+class Program
+{
+    static void Main()
+    {
+        Console.WriteLine("Ââĺäčňĺ ňđč ÷čńëŕ:");
+
+        int a = int.Parse(Console.ReadLine());
+        int b = int.Parse(Console.ReadLine());
+        int c = int.Parse(Console.ReadLine());
+
+        int resultA = Math.Pow(a, a >= 0 ? 2 : 4);
+        int resultB = Math.Pow(b, b >= 0 ? 2 : 4);
+        int resultC = Math.Pow(c, c >= 0 ? 2 : 4);
+
+        Console.WriteLine($"Đĺçóëüňŕňű:");
+        Console.WriteLine($"a = {a:F2} ? {resultA:F2}");
+        Console.WriteLine($"b = {b:F2} ? {resultB:F2}");
+        Console.WriteLine($"c = {c:F2} ? {resultC:F2}");
+    }
+}
+
+Đĺçóëüňŕň:
+Ââĺäčňĺ ňđč ÷čńëŕ:
+1
+2
+4
+Đĺçóëüňŕňű:
+a = 1,00 ? 1,00
+b = 2,00 ? 4,00
+c = 4,00 ? 16,00
+
+
+Çŕäŕíčĺ š2
+
+Ęîä:
+using System;
+
+class Program
+{
+    static void Main()
+    {
+        Console.WriteLine("Ââĺäčňĺ ęîîđäčíŕňű ďĺđâîé ňî÷ęč (x1 y1):");
+        string[] input1 = Console.ReadLine().Split();
+        double x1 = double.Parse(input1[0]);
+        double y1 = double.Parse(input1[1]);
+
+        Console.WriteLine("Ââĺäčňĺ ęîîđäčíŕňű âňîđîé ňî÷ęč (x2 y2):");
+        string[] input2 = Console.ReadLine().Split();
+        double x2 = double.Parse(input2[0]);
+        double y2 = double.Parse(input2[1]);
+
+        // Âű÷čńë˙ĺě đŕńńňî˙íč˙ äî íŕ÷ŕëŕ ęîîđäčíŕň
+        double dist1Sqr = x1 * x1 + y1 * y1;  // Ęâŕäđŕň đŕńńňî˙íč˙ ďĺđâîé ňî÷ęč
+        double dist2Sqr = x2 * x2 + y2 * y2;  // Ęâŕäđŕň đŕńńňî˙íč˙ âňîđîé ňî÷ęč
+
+        // Âűâîäčě đŕńńňî˙íč˙
+        Console.WriteLine($"Đŕńńňî˙íčĺ îň ňî÷ęč 1 äî íŕ÷ŕëŕ ęîîđäčíŕň: {Math.Sqrt(dist1Sqr):F2}");
+        Console.WriteLine($"Đŕńńňî˙íčĺ îň ňî÷ęč 2 äî íŕ÷ŕëŕ ęîîđäčíŕň: {Math.Sqrt(dist2Sqr):F2}");
+
+        // Ńđŕâíčâŕĺě č îďđĺäĺë˙ĺě áëčćŕéřóţ
+        if (dist1Sqr < dist2Sqr)
+        {
+            Console.WriteLine("Ňî÷ęŕ 1 áëčćĺ ę íŕ÷ŕëó ęîîđäčíŕň.");
+        }
+        else if (dist1Sqr > dist2Sqr)
+        {
+            Console.WriteLine("Ňî÷ęŕ 2 áëčćĺ ę íŕ÷ŕëó ęîîđäčíŕň.");
+        }
+        else
+        {
+            Console.WriteLine("Îáĺ ňî÷ęč íŕőîä˙ňń˙ íŕ îäčíŕęîâîě đŕńńňî˙íčč îň íŕ÷ŕëŕ ęîîđäčíŕň.");
+        }
+    }
+}
+
+
+Đĺçóëüňŕň:
+Ââĺäčňĺ ęîîđäčíŕňű ďĺđâîé ňî÷ęč (x1 y1):
+2 5
+Ââĺäčňĺ ęîîđäčíŕňű âňîđîé ňî÷ęč (x2 y2):
+4 7
+Đŕńńňî˙íčĺ îň ňî÷ęč 1 äî íŕ÷ŕëŕ ęîîđäčíŕň: 5,39
+Đŕńńňî˙íčĺ îň ňî÷ęč 2 äî íŕ÷ŕëŕ ęîîđäčíŕň: 8,06
+Ňî÷ęŕ 1 áëčćĺ ę íŕ÷ŕëó ęîîđäčíŕň.
+
+Çŕäŕíčĺ š3
+
+Ęîä:
+using System;
+
+class Program
+{
+    static void Main()
+    {
+        Console.WriteLine("Ââĺäčňĺ äâŕ óăëŕ ňđĺóăîëüíčęŕ (â ăđŕäóńŕő):");
+
+        Console.Write("Ďĺđâűé óăîë: ");
+        double angle1 = double.Parse(Console.ReadLine());
+
+        Console.Write("Âňîđîé óăîë: ");
+        double angle2 = double.Parse(Console.ReadLine());
+
+        // Ďđîâĺđęŕ, ÷ňî óăëű ďîëîćčňĺëüíűĺ
+        if (angle1 <= 0 || angle2 <= 0)
+        {
+            Console.WriteLine("Ňđĺóăîëüíčę íĺ ńóůĺńňâóĺň (óăëű äîëćíű áűňü ďîëîćčňĺëüíűěč).");
+            return;
+        }
+
+        // Âű÷čńë˙ĺě ňđĺňčé óăîë
+        double angle3 = 180 - angle1 - angle2;
+
+        // Ďđîâĺđ˙ĺě, ńóůĺńňâóĺň ëč ňđĺóăîëüíčę
+        if (angle3 <= 0)
+        {
+            Console.WriteLine("Ňđĺóăîëüíčę íĺ ńóůĺńňâóĺň (ńóěěŕ óăëîâ áîëüřĺ 180°).");
+            return;
+        }
+
+        Console.WriteLine($"Ňđĺňčé óăîë: {angle3:F2}°");
+
+        // Ďđîâĺđ˙ĺě, ďđ˙ěîóăîëüíűé ëč ňđĺóăîëüíčę
+        if (Math.Abs(angle1 - 90) < 1e-6 || Math.Abs(angle2 - 90) < 1e-6 || Math.Abs(angle3 - 90) < 1e-6)
+        {
+            Console.WriteLine("Ňđĺóăîëüíčę ńóůĺńňâóĺň č ˙âë˙ĺňń˙ ďđ˙ěîóăîëüíűě.");
+        }
+        else
+        {
+            Console.WriteLine("Ňđĺóăîëüíčę ńóůĺńňâóĺň, íî íĺ ˙âë˙ĺňń˙ ďđ˙ěîóăîëüíűě.");
+        }
+    }
+}
+
+Đĺçóňüňŕň:
+Ââĺäčňĺ äâŕ óăëŕ ňđĺóăîëüíčęŕ (â ăđŕäóńŕő):
+Ďĺđâűé óăîë: 46
+Âňîđîé óăîë: 87
+Ňđĺňčé óăîë: 47,00°
+Ňđĺóăîëüíčę ńóůĺńňâóĺň, íî íĺ ˙âë˙ĺňń˙ ďđ˙ěîóăîëüíűě.
+
+Çŕäŕíčĺ š7
+
+Ęîä:
+using System;
+
+class Program
+{
+    static void Main()
+    {
+        int a = int.Parse(Console.ReadLine());
+        int b = int.Parse(Console.ReadLine());
+        int c = int.Parse(Console.ReadLine());
+
+        int min = Math.Min(Math.Min(a, b), c);
+        int max = Math.Max(Math.Max(a, b), c);
+        int sum = min + max;
+
+        Console.WriteLine($"Ěčíčěóě: {min}");
+        Console.WriteLine($"Ěŕęńčěóě: {max}");
+        Console.WriteLine($"Ńóěěŕ: {sum}");
+    }
+}
+
+
+Đĺçóëüňŕň:
+4
+8
+3
+Ěčíčěóě: 3
+Ěŕęńčěóě: 8
+Ńóěěŕ: 11
+

+ 25 - 0
wer.sln

@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.13.35931.197 d17.13
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wer", "wer\wer.csproj", "{5291CBD4-8797-4627-A4DA-B71A42954FAB}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{5291CBD4-8797-4627-A4DA-B71A42954FAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{5291CBD4-8797-4627-A4DA-B71A42954FAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{5291CBD4-8797-4627-A4DA-B71A42954FAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{5291CBD4-8797-4627-A4DA-B71A42954FAB}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {4E7943B3-E248-43FF-AB97-E465141DFBE3}
+	EndGlobalSection
+EndGlobal

+ 3 - 0
wer/.gitignore

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

+ 19 - 0
wer/Program.cs

@@ -0,0 +1,19 @@
+using System;
+
+class Program
+{
+    static void Main()
+    {
+        int a = int.Parse(Console.ReadLine());
+        int b = int.Parse(Console.ReadLine());
+        int c = int.Parse(Console.ReadLine());
+
+        int min = Math.Min(Math.Min(a, b), c);
+        int max = Math.Max(Math.Max(a, b), c);
+        int sum = min + max;
+
+        Console.WriteLine($"Минимум: {min}");
+        Console.WriteLine($"Максимум: {max}");
+        Console.WriteLine($"Сумма: {sum}");
+    }
+}

+ 10 - 0
wer/wer.csproj

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