From f7d33c4b8f99790f2c14286119cef0b99b62b729 Mon Sep 17 00:00:00 2001 From: User of A309 Date: Sat, 14 Sep 2019 14:48:43 +0400 Subject: [PATCH 1/5] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D0=B0=20=D0=B8=D0=BC=D1=8F=20=D0=B8=20=D1=84=D0=B0=D0=BC=D0=B8?= =?UTF-8?q?=D0=BB=D0=B8=D1=8E)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 02c3f27..c101229 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# Tprogramming_42_2019 \ No newline at end of file +# Tprogramming_42_2019 + +Elizaveta_Kalashnikova From 34e0ce3e2db07954cb6340de15d17f8b3e7efd1c Mon Sep 17 00:00:00 2001 From: lizka-glitch <55316931+lizka-glitch@users.noreply.github.com> Date: Sun, 13 Oct 2019 19:36:03 +0300 Subject: [PATCH 2/5] Create Program.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit лабраторная 1 --- Program.cs | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Program.cs diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..fb6cd0f --- /dev/null +++ b/Program.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; + +namespace Rextester +{ + public class Program + { + public static void Problem(double a, double b, double x_begin, double x_end, double x_delta) + { + double yA; + for (double x = x_begin; x < x_end; x = (x + x_delta)) + { + yA = ((Math.Pow(a, x) - Math.Pow(b, x)) * (Math.Pow(a, (1 / 3)) * (Math.Pow(b, (1 / 3))))) /(Math.Log10(a/b)); + Console.WriteLine(yA + " "); + } + } + public static void Arr(double a, double b) + { + double yB; + double[] arr = { 4.48, 3.56, 2.78, 5.28,3.21 }; + for (int i = 0; i < 5; i++) + { + yB = ((Math.Pow(a, arr[i]) - Math.Pow(b, arr[i])) * (Math.Pow(a, (1 / 3)) * (Math.Pow(b, (1 / 3))))) / (Math.Log10(a / b)); + Console.WriteLine(yB + " "); + } + + } + public static void Main(string[] args) + { + Console.WriteLine("A "); + Rextester.Program.Problem(0.4, 0.8, 3.2, 6.2, 0.6); + Console.WriteLine("B "); + Rextester.Program.Arr(0.4, 0.8); + + } + } +} From 0208d8305e740a354dabfa1404cdbbe2c12cc9dc Mon Sep 17 00:00:00 2001 From: lizka-glitch <55316931+lizka-glitch@users.noreply.github.com> Date: Mon, 21 Oct 2019 08:24:00 +0300 Subject: [PATCH 3/5] Update Program.cs lab1 --- CourseApp/Program.cs | 49 +++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/CourseApp/Program.cs b/CourseApp/Program.cs index 7450310..fb6cd0f 100644 --- a/CourseApp/Program.cs +++ b/CourseApp/Program.cs @@ -1,46 +1,39 @@ using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; -namespace CourseApp +namespace Rextester { public class Program { - public static double MyFunction(double a, double b, double x) + public static void Problem(double a, double b, double x_begin, double x_end, double x_delta) { - var y = (a * Math.Pow(x, 2)) + (b * x); - return y; + double yA; + for (double x = x_begin; x < x_end; x = (x + x_delta)) + { + yA = ((Math.Pow(a, x) - Math.Pow(b, x)) * (Math.Pow(a, (1 / 3)) * (Math.Pow(b, (1 / 3))))) /(Math.Log10(a/b)); + Console.WriteLine(yA + " "); + } } - - public static double[] TaskA(double a, double b, double xn, double xk, double dx) + public static void Arr(double a, double b) { - return new double[0]; - } - - public static double[] TaskB(double a, double b, double[] x) - { - var y = new double[x.Length]; - for (var i = 0; i < x.Length; i++) + double yB; + double[] arr = { 4.48, 3.56, 2.78, 5.28,3.21 }; + for (int i = 0; i < 5; i++) { - y[i] = MyFunction(a, b, x[i]); + yB = ((Math.Pow(a, arr[i]) - Math.Pow(b, arr[i])) * (Math.Pow(a, (1 / 3)) * (Math.Pow(b, (1 / 3))))) / (Math.Log10(a / b)); + Console.WriteLine(yB + " "); } - return y; } - public static void Main(string[] args) { - Console.WriteLine("Hello World!"); - const double a = 2.2; - const double b = 3.8; - var resSingle = MyFunction(a, b, 4); - Console.WriteLine(resSingle); - var x = new double[] { 1, 2, 3, 4, 5 }; - var taskBRes = TaskB(a, b, x); - foreach (var item in taskBRes) - { - Console.WriteLine($"y = {item}"); - } + Console.WriteLine("A "); + Rextester.Program.Problem(0.4, 0.8, 3.2, 6.2, 0.6); + Console.WriteLine("B "); + Rextester.Program.Arr(0.4, 0.8); - Console.ReadLine(); } } } From 8f9a520b51ef597ffae0112a87d9c004e9c26b4f Mon Sep 17 00:00:00 2001 From: lizka-glitch Date: Sat, 2 Nov 2019 14:04:48 +0300 Subject: [PATCH 4/5] Added initial lab --- Program.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Program.cs b/Program.cs index fb6cd0f..d7526ab 100644 --- a/Program.cs +++ b/Program.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.RegularExpressions; + namespace Rextester { From a269fa9dded5db5805dc8d30ac15248fbbda78db Mon Sep 17 00:00:00 2001 From: lizka-glitch <55316931+lizka-glitch@users.noreply.github.com> Date: Sat, 2 Nov 2019 14:43:41 +0300 Subject: [PATCH 5/5] Delete Program.cs --- CourseApp/Program.cs | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 CourseApp/Program.cs diff --git a/CourseApp/Program.cs b/CourseApp/Program.cs deleted file mode 100644 index fb6cd0f..0000000 --- a/CourseApp/Program.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.RegularExpressions; - -namespace Rextester -{ - public class Program - { - public static void Problem(double a, double b, double x_begin, double x_end, double x_delta) - { - double yA; - for (double x = x_begin; x < x_end; x = (x + x_delta)) - { - yA = ((Math.Pow(a, x) - Math.Pow(b, x)) * (Math.Pow(a, (1 / 3)) * (Math.Pow(b, (1 / 3))))) /(Math.Log10(a/b)); - Console.WriteLine(yA + " "); - } - } - public static void Arr(double a, double b) - { - double yB; - double[] arr = { 4.48, 3.56, 2.78, 5.28,3.21 }; - for (int i = 0; i < 5; i++) - { - yB = ((Math.Pow(a, arr[i]) - Math.Pow(b, arr[i])) * (Math.Pow(a, (1 / 3)) * (Math.Pow(b, (1 / 3))))) / (Math.Log10(a / b)); - Console.WriteLine(yB + " "); - } - - } - public static void Main(string[] args) - { - Console.WriteLine("A "); - Rextester.Program.Problem(0.4, 0.8, 3.2, 6.2, 0.6); - Console.WriteLine("B "); - Rextester.Program.Arr(0.4, 0.8); - - } - } -}