Skip to content
2 changes: 1 addition & 1 deletion CourseApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Console.WriteLine("Анастасия Зайцева");
}
}
}
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# Course of c#

Please write your name and surname here
��������� �������
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можо каким-то другим редактором поддреживающим кодировку?

38 changes: 38 additions & 0 deletions laba2/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using System;

namespace CourseApp3
{
class Program4
{

static void Main(string[] args)
{
double xn = 0.15;
double xk = 1.37;
double dx = 0.25;
double[] xx = { 0.2, 0.3, 0.44, 0.6, 0.56 };

Console.WriteLine("под А");

for (double x = xn; x < xk; x += dx)
{
Console.WriteLine(Fan(x));

}
Console.WriteLine("под B");
foreach (double x in xx)
{
Console.WriteLine(Fan(x));
}
}
static double Fan(double x)
{
double a = 0.1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a и b следует также вынести в параметры функции

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Так и не изменено :(

double b = 0.5;
double y;
y = ((a + (Math.Tan(b * x)) * (Math.Tan(b * x))) / (b + (1 / (Math.Tan(a * x))) * (1 / (Math.Tan(a * x)))));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А зачем так разделять?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Объедините объявление и присвоение

return y;
}

}
}