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);
uses graphabc;
SetPenWidth(3);
MoveTo(100,50);
LineTo(150,200);
LineTo(100,400);
LineTo(200,200);
LineTo(200,150);
LineTo(100,50);
FloodFill(150,150, clGray);
MoveTo(200,150);
LineTo(300,100);
LineTo(350,50);
LineTo(500,100);
LineTo(550,150);
LineTo(550,200);
LineTo(500,250);
LineTo(350,300);
LineTo(300,250);
Line(300,100,500,100);
FloodFill(350,90, clGray);
Line(300,250,500,250);
FloodFill(350,290, clGray);
SetBrushColor(clGray);
Circle(500,150,10);
SetBrushColor(clBlack);
Circle(500,150,4);
Rectangle(550,150,557,200);
SetBrushStyle(bsDiagCross);
FloodFill(250,150, clGray)
Объяснение:
картинка
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.
uses graphabc;
begin
SetPenWidth(3);
MoveTo(100,50);
LineTo(150,200);
LineTo(100,400);
LineTo(200,200);
LineTo(200,150);
LineTo(100,50);
FloodFill(150,150, clGray);
MoveTo(200,150);
LineTo(300,100);
LineTo(350,50);
LineTo(500,100);
LineTo(550,150);
LineTo(550,200);
LineTo(500,250);
LineTo(350,300);
LineTo(300,250);
LineTo(200,200);
Line(300,100,500,100);
FloodFill(350,90, clGray);
Line(300,250,500,250);
FloodFill(350,290, clGray);
SetBrushColor(clGray);
Circle(500,150,10);
SetBrushColor(clBlack);
Circle(500,150,4);
Rectangle(550,150,557,200);
SetBrushStyle(bsDiagCross);
FloodFill(250,150, clGray)
end.
Объяснение:
картинка