Const e=0.001;
var x,a,a2,s:real; n:integer;
begin
write('x=');readln(x);
a:=x;
a2:=x*x;
s:=x;
n:=0;
while abs(a)>e do begin
n:=n+1;
a:=a*a2/(2*n)/(2*n+1);
s:=s+a;
end;
writeln('s = ',s:7:5);
writeln('f = ',sinh(x):7:5);
end.
Пример:
x=1.5
s = 2.12928
f = 2.12928