From eaae4ae9b9b03bcf7958141da525bcfeb9f31fb1 Mon Sep 17 00:00:00 2001 From: User of DK12 Date: Tue, 2 Oct 2018 12:50:38 +0400 Subject: [PATCH 1/3] Added initial lab --- CourseApp/CourseApp.csproj | 2 +- CourseApp/CourseApp.sln | 25 +++++++++++++++++++++++++ CourseApp/Program.cs | 2 +- README.md | 2 +- 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 CourseApp/CourseApp.sln 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..8dc2a88 100644 --- a/CourseApp/Program.cs +++ b/CourseApp/Program.cs @@ -6,7 +6,7 @@ class Program { static void Main(string[] args) { - Console.WriteLine("Hello World!"); + Console.WriteLine("Берендеев Михаил Сергеевич"); } } } 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 +Берендеев Михаил Сергеевич From d9096434c21e4d67ba44ed9a39d52ec19bbce894 Mon Sep 17 00:00:00 2001 From: User of DK12 Date: Tue, 20 Nov 2018 12:23:36 +0400 Subject: [PATCH 2/3] kakayato rabota --- CourseApp/TAI1.cs | 41 ++++++++++++++++++++++++++++++++++ CourseApp/TProgramming_42_2018 | 1 + Program1.1.cs | 13 +++++++++++ TProgramming_42_2018 | 1 + 4 files changed, 56 insertions(+) create mode 100644 CourseApp/TAI1.cs create mode 160000 CourseApp/TProgramming_42_2018 create mode 100644 Program1.1.cs create mode 160000 TProgramming_42_2018 diff --git a/CourseApp/TAI1.cs b/CourseApp/TAI1.cs new file mode 100644 index 0000000..f299f7d --- /dev/null +++ b/CourseApp/TAI1.cs @@ -0,0 +1,41 @@ +using System; +using CourseApp; + +namespace CourseApp +{ + public class Program + { + 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() + { + // задание а + 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, x), 3)} "); + } + Console.ReadLine(); + } + + private static double Func(double i, object z) + { + throw new NotImplementedException(); + } + } +} \ 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/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 From 82e68881018663c1e91aaa3f342c989f0f9c3427 Mon Sep 17 00:00:00 2001 From: User of DK12 Date: Tue, 18 Dec 2018 13:09:36 +0400 Subject: [PATCH 3/3] Rabota2 --- CourseApp.Tests/CourseApp.Tests.csproj | 16 ++++++++++ CourseApp.Tests/UnitTest1.cs | 14 +++++++++ CourseApp/Program.cs | 31 ++++++++++++++++--- CourseApp/TAI1.cs | 41 -------------------------- 4 files changed, 57 insertions(+), 45 deletions(-) create mode 100644 CourseApp.Tests/CourseApp.Tests.csproj create mode 100644 CourseApp.Tests/UnitTest1.cs delete mode 100644 CourseApp/TAI1.cs 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/Program.cs b/CourseApp/Program.cs index 8dc2a88..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("Берендеев Михаил Сергеевич"); + // задание а + 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/TAI1.cs b/CourseApp/TAI1.cs deleted file mode 100644 index f299f7d..0000000 --- a/CourseApp/TAI1.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using CourseApp; - -namespace CourseApp -{ - public class Program - { - 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() - { - // задание а - 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, x), 3)} "); - } - Console.ReadLine(); - } - - private static double Func(double i, object z) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file