ソースを参照

Добавьте файлы проекта.

ШмелевМВ 2 日 前
コミット
7e5d965ff9

+ 25 - 0
ClassificationOnLevelDetalization.sln

@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.11.35222.181
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassificationOnLevelDetalization", "ClassificationOnLevelDetalization\ClassificationOnLevelDetalization.csproj", "{1B37839F-BBCD-4299-AD8E-2FE770F214FB}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{1B37839F-BBCD-4299-AD8E-2FE770F214FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{1B37839F-BBCD-4299-AD8E-2FE770F214FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{1B37839F-BBCD-4299-AD8E-2FE770F214FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{1B37839F-BBCD-4299-AD8E-2FE770F214FB}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {D89CF3EA-7FF4-40FB-B2E7-6211B740F42C}
+	EndGlobalSection
+EndGlobal

+ 111 - 0
ClassificationOnLevelDetalization/Class1.cs

@@ -0,0 +1,111 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ClassificationOnLevelDetalization
+{
+    public class Class1
+    {
+        public double GetCos(double x)
+        {
+            double myCos;
+            myCos = Math.Sqrt(1 - Math.Sin(x)*Math.Sin(x));
+            return myCos;
+        }
+        public double DriverGetCos(double x)
+        {
+            double myCos;
+            myCos = GetCos(x);
+            Console.Write("\nДрайвер косинуса: "+ myCos);
+            return myCos;
+        }
+        public double GetSec(double x)
+        {
+            double mySec;
+            mySec = 1/GetCos(x);
+            return mySec;
+        }
+        public double DriverGetSec(double x)
+        {
+            double mySec;
+            mySec = GetSec(x);
+            Console.Write("\nДрайвер сек: " + mySec);
+            return mySec;
+        }
+        public double GetTan(double x)
+        {
+            double myTan;
+            myTan = Math.Sin(x) / GetCos(x);
+            return myTan;
+        }
+        public double DriverGetTan(double x)
+        {
+            double myTan;
+            myTan = GetTan(x);
+            Console.Write("\nДрайвер тан: " + myTan);
+            return myTan;
+        }
+        public double GetCot(double x)
+        {
+            double myCot;
+            myCot = GetCos(x) / Math.Sin(x);
+            return myCot;
+        }
+        public double DriverGetCot(double x)
+        {
+            double myCot;
+            myCot = GetCot(x);
+            Console.Write("\nДрайвер котангес: " + myCot);
+            return myCot;
+        }
+        public double GetLog(int a, double x)
+        {
+            double myLog;
+            if(a != 1 && a > 0)
+            {
+                myLog = Math.Log(x) / Math.Log(a);
+                return myLog;
+            }
+            else
+            {
+                Console.WriteLine("Неверный данные");
+                return -111111111;
+            }
+        }
+        public double DriverGetLog(int a, double x)
+        {
+            double myLog;
+            myLog = GetLog(a,x);
+            Console.Write("\nДрайвер логарифм: " + myLog);
+            return myLog;
+        }
+        public double First(double x)
+        {
+            double result;
+            result = ((((GetCot(x) / GetSec(x)) - GetTan(x) ) * Math.Sin(x)) / GetCos(x)) * (((Math.Sin(x) + GetCos(x)) + GetCos(x)) * ((Math.Sin(x) + GetCos(x)) + GetCos(x)));
+            return result;
+        }
+        public double DriverFirst(double x)
+        {
+            double result;
+            result = First(x);
+            Console.Write("\nДрайвер результата первого: " + result);
+            return result;
+        }
+        public double Second(double x)
+        {
+            double result;
+            result = ((((GetLog(5, x) * GetLog(5, x) * GetLog(5, x)) * GetLog(10, x)) + GetLog(3, x)) / Math.Log(x)) + (Math.Log(x) * GetLog(5, x));
+            return result;
+        }
+        public double DriverSecond(double x)
+        {
+            double result;
+            result = Second(x);
+            Console.Write("\nДрайвер результата второго: " + result);
+            return result;
+        }
+    }
+}

+ 10 - 0
ClassificationOnLevelDetalization/ClassificationOnLevelDetalization.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>

+ 31 - 0
ClassificationOnLevelDetalization/Program.cs

@@ -0,0 +1,31 @@
+using ClassificationOnLevelDetalization;
+using System.Runtime.CompilerServices;
+
+Class1 class1 = new Class1();
+//class1.DriverGetCos(3.14);
+//class1.DriverGetSec(3.14);
+//class1.DriverGetTan(3.14);
+//class1.DriverGetCot(3.14);
+class1.DriverGetLog(2, 8);
+//class1.DriverFirst(-3.14);
+//class1.DriverSecond(2);
+
+//while (true)
+//{
+//    Console.WriteLine("\nВведите х, чтобы выйти введите 0 или 1");
+//    double x = Convert.ToDouble(Console.ReadLine());
+//    if (x < 0)
+//    {
+//        class1.First(x);
+//    }
+//    else if (x > 1)
+//    {
+//        class1.Second(x);
+//    }
+//    else
+//    {
+//        break;
+//    }
+//}
+
+