1 вариант
Pascal
Var
n,k,i:integer;
X,A,f,C:Real;
begin
k:=1;
Writeln('Введите N');
Readln(n);
Writeln('Введите X');
Readln(x);
Writeln('Введите A');
Readln(a);
F:=(exp(ln(X/A)*1))/1;
for i:=2 to n do begin
k:=k*i;
C:=(exp(ln(X/A)*N))/K;
F:=F+C;
end;
Writeln(F);
end.
2 вариант
var
X, A, F : Real;
i, N : Integer;
Write('n = '); ReadLn(N);
Write('x = '); ReadLn(X);
Write('a = '); ReadLn(A);
F := 1;
Sum := F;
for i := 1 to N do
F := F * (X / A) / i;
Sum := Sum + F;
WriteLn(Sum:0:5);
1 вариант
Pascal
Var
n,k,i:integer;
X,A,f,C:Real;
begin
k:=1;
Writeln('Введите N');
Readln(n);
Writeln('Введите X');
Readln(x);
Writeln('Введите A');
Readln(a);
F:=(exp(ln(X/A)*1))/1;
for i:=2 to n do begin
k:=k*i;
C:=(exp(ln(X/A)*N))/K;
F:=F+C;
end;
Writeln(F);
end.
2 вариант
var
X, A, F : Real;
i, N : Integer;
begin
Write('n = '); ReadLn(N);
Write('x = '); ReadLn(X);
Write('a = '); ReadLn(A);
F := 1;
Sum := F;
for i := 1 to N do
begin
F := F * (X / A) / i;
Sum := Sum + F;
end;
WriteLn(Sum:0:5);
end.