Ребята, помогите решить:
через for
y= x^6/1! + x^5/2! + x^4/3! +x^3/4! + x^2/5! +x/6! x=1.5
Задача вроде легкая,но.........
var
fact: longint;
s: real;
...
fact := 1 * 2 * 3 * 4 * 5 * 6;
next := 1; s := 0;
for i := 6 downto 1 do begin
next := next * x;
s := s + next / fact;
fact := fact div i;
end;
...