Var
x, a, s: real;
n, i: integer;
begin
write('Введите x и n ');
readln(x, n);
a := 1;
s := a;
for i := 1 to n do
begin
a := a * (-1) * x * x / (2 * i - 1) / (2 * i);
s := s + a;
end;
writeln('S = ', s:10:3);
end.
Uses graphABC;
const
c: array [1..7, 1..3] of byte = ((50, 50, 133), (0, 0, 255), (0, 160, 227), (0, 255, 0), (255, 255, 0), (239, 127, 26), (255, 0, 0));
var
i: byte;
procedure ColArc(x, y: integer; r: integer; nc: byte);
begin
SetPenColor(rgb(c[nc, 1], c[nc, 2], c[nc, 3]));
Arc(x, y, r + 10, 0, 180);
Arc(x, y, r - 10, 0, 180);
line(x - r - 11, y - 2, x - r + 11, y - 2);
line(x + r - 11, y - 2, x + r + 11, y - 2);
floodfill(x, y - r, rgb(c[nc, 1], c[nc, 2], c[nc, 3]));
end;
begin
setwindowsize(500, 300);
for i := 1 to 7 do
ColArc(250, 300, 100 + (i * 20), i);
end.