Const e=0.001;
var x,a,s:real; n:integer;
begin
write('x=');readln(x);
writeln(' x S(x) y(x)');
a:=1; s:=1; n:=1;
while abs(a)>e do
begin
a:=-a*x*x/(2*n-1)/(2*n);
s:=s+a;
n:=n+1;
end;
writeln(x:3:1,' ',s:8:5,' ',cos(x):8:5);
end.
Пример:
x=0.6
x S(x) y(x)
0.6 0.82534 0.82534