===== PascalABC.NET =====
Задание 1
begin
var x := -Pi / 2;
while x <= Pi / 2 + 1e-5 do
Writeln(x:8:5, Sin(x):20:14);
x += Pi / 12
end;
end.
Задание 2
var (s, p2, z) := (0.0, 2.0, 1);
for var n := 1 to 1000 do
s += z * n * n * n / p2;
z := -z;
p2 *= 2
Println(s)
===== PascalABC.NET =====
Задание 1
begin
var x := -Pi / 2;
while x <= Pi / 2 + 1e-5 do
begin
Writeln(x:8:5, Sin(x):20:14);
x += Pi / 12
end;
end.
Задание 2
begin
var (s, p2, z) := (0.0, 2.0, 1);
for var n := 1 to 1000 do
begin
s += z * n * n * n / p2;
z := -z;
p2 *= 2
end;
Println(s)
end.