Var
y,x,E,Ch,F,St:real;
n:integer;
Begin
Write('E = ');ReadLn(E);
Write('x = ');ReadLn(x);
y:=0;
St:=1;
Ch:=1;
n:=1;
F:=1;
While Ch>=E do
Begin
y:=y+Ch;
F:=F*n;
St:=St*x;
Ch:=St/F;
n:=n+1;
End;
Write('y = ',y)
End.
Пример:
E = 0.001
x = 13
y = 442413.391363861