diff --git a/CourseApp.Tests/CourseApp.Tests.csproj b/CourseApp.Tests/CourseApp.Tests.csproj new file mode 100644 index 0000000..6179f64 --- /dev/null +++ b/CourseApp.Tests/CourseApp.Tests.csproj @@ -0,0 +1,16 @@ + + + + netcoreapp2.0 + + false + + + + + + + + + + diff --git a/CourseApp.Tests/UnitTest1.cs b/CourseApp.Tests/UnitTest1.cs new file mode 100644 index 0000000..bc225f0 --- /dev/null +++ b/CourseApp.Tests/UnitTest1.cs @@ -0,0 +1,14 @@ +using System; +using Xunit; + +namespace CourseApp.Tests +{ + public class UnitTest1 + { + [Fact] + public void Test1() + { + + } + } +} diff --git a/CourseApp/CourseApp.csproj b/CourseApp/CourseApp.csproj index 23df604..ce1697a 100644 --- a/CourseApp/CourseApp.csproj +++ b/CourseApp/CourseApp.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.1 + netcoreapp2.0 diff --git a/CourseApp/CourseApp.sln b/CourseApp/CourseApp.sln new file mode 100644 index 0000000..5fb4298 --- /dev/null +++ b/CourseApp/CourseApp.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27428.2002 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CourseApp", "CourseApp.csproj", "{55ECE0CC-BA37-4343-B1EE-0C1E984D05A0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {55ECE0CC-BA37-4343-B1EE-0C1E984D05A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {55ECE0CC-BA37-4343-B1EE-0C1E984D05A0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55ECE0CC-BA37-4343-B1EE-0C1E984D05A0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55ECE0CC-BA37-4343-B1EE-0C1E984D05A0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FCE92231-A10F-4020-851B-752E265FBE2A} + EndGlobalSection +EndGlobal diff --git a/CourseApp/Program.cs b/CourseApp/Program.cs index 3f81738..b941334 100644 --- a/CourseApp/Program.cs +++ b/CourseApp/Program.cs @@ -1,12 +1,35 @@ using System; +using CourseApp; namespace CourseApp { - class Program + public class Program { - static void Main(string[] args) + private static object x; + + public static double Func(double z) + { + return Math.Pow(Math.Abs((z * z) - 2.5), 1.0 / 4) + Math.Pow(Math.Log(z * z), 1.0 / 3); + } + + private static void Main() { - Console.WriteLine("Hello World!"); + // задание а + float xn = 1.25f;//х начальное + float xk = 3.25f;//х конечное + float dx = 0.4f;//шаг + for (float x = xn; x <= xk; x += dx) + { + Console.WriteLine($" x={x} y={Math.Round(Func(x), 3)}"); + } + Console.WriteLine(); + //задание b + double[] Xm = new double[5] { 1.84, 2.71, 3.81, 4.56, 5.62 }; + foreach (double i in Xm) + { + Console.WriteLine($" X={i} y={Math.Round(Func(i), 3)} "); + } + Console.ReadLine(); } } -} +} \ No newline at end of file diff --git a/CourseApp/TProgramming_42_2018 b/CourseApp/TProgramming_42_2018 new file mode 160000 index 0000000..476cedb --- /dev/null +++ b/CourseApp/TProgramming_42_2018 @@ -0,0 +1 @@ +Subproject commit 476cedbd69223ada3ca356759d3bfb8c8e7dcc44 diff --git a/Program1.1.cs b/Program1.1.cs new file mode 100644 index 0000000..4989672 --- /dev/null +++ b/Program1.1.cs @@ -0,0 +1,13 @@ +Using System; +{class Program + int y, x; + x = 1.25; + do + { + Console.WriteLine(y==Math.Pow((Math.Abs(x^2-2,5)), 1/4) + Math.Pow(Math.Log(x^2), 1/3)); + x+=0.4; + } +while (x < 3.25);} + + + diff --git a/README.md b/README.md index ee1aa8c..735a0bc 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # Course of c# -Please write your name and surname here \ No newline at end of file +Берендеев Михаил Сергеевич diff --git a/TProgramming_42_2018 b/TProgramming_42_2018 new file mode 160000 index 0000000..476cedb --- /dev/null +++ b/TProgramming_42_2018 @@ -0,0 +1 @@ +Subproject commit 476cedbd69223ada3ca356759d3bfb8c8e7dcc44