Помогите пожалуйста доделать
Вот чё у меня получилось:
Код
program uau;
var
x, eps, next, s: real;
n, sign: integer;
begin
write('X = '); readln(X);
write('Eps = '); readln(eps);
if (exp(x)>0) then
next := 1; s := 0;
n := 1; sign := 1;
repeat
next := next*x;
s := s + sign * next / n;
n := n + 1; sign := - sign;
until (next / n) < eps;
writeln('', exp(x):10:5, ' = ', s:10:5);
end.
else writeln('exp(x)<0');
end.
var
x, eps, next, s: real;
n, sign: integer;
begin
write('X = '); readln(X);
write('Eps = '); readln(eps);
if (exp(x)>0) then
next := 1; s := 0;
n := 1; sign := 1;
repeat
next := next*x;
s := s + sign * next / n;
n := n + 1; sign := - sign;
until (next / n) < eps;
writeln('', exp(x):10:5, ' = ', s:10:5);
end.
else writeln('exp(x)<0');
end.