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/Program.cs b/CourseApp/Program.cs index 3f81738..78095ef 100644 --- a/CourseApp/Program.cs +++ b/CourseApp/Program.cs @@ -1,12 +1,37 @@ using System; -namespace CourseApp +namespace Matan { class Program { + public static double y(double x, double a, double b) + { + return (Math.Asin(Math.Pow(x, a) + Math.Acos(Math.Pow(x, b)))); + } + static void Main(string[] args) { - Console.WriteLine("Hello World!"); + double a = 2; + double b = 3; + double xn = 0.11; + double xk = 0.36; + double dx = 0.05; + + double[] x = new double[5] { 0.08, 0.26, 0.35, 0.41, 0.53 }; + + Console.WriteLine("Задача A:"); + + for (double xl = xn; xl < xk; xl += dx) + { + Console.WriteLine($"Для x = {xl}\t y = {y(xl, a, b)}"); + } + + Console.WriteLine("Задача B:"); + + foreach (double i in x) + { + Console.WriteLine($"Для x = {i}\t y = {y(i, a, b)}"); + } } } -} +} \ No newline at end of file diff --git a/README.md b/README.md index ee1aa8c..ce86971 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 +Anton_Naumov \ No newline at end of file