Var x,y,xx,yy,xy,s:real; n:integer;
i:integer;
begin
write('x = '); readln(x);
write('y = '); readln(y);
write('n = '); readln(n);
s:=0;
xx:=1; yy:=1; xy:=1;
for i:=1 to n do
begin
xx:=xx*x; yy:=yy*y;
xy:=xy*(x+y);
s:=s+(xx+yy)/xy;
end;
writeln('s = ',s);
end.
Пример:
x = 2
y = 3
n = 4
s = 1.9552