program For23;
var
X,Rez,factorial,pow:Real;
N, i :Integer;
begin
Write('Введите X: ');
Readln(X);
Write('Введите N: ');
Readln(N);
Rez:=0;
pow:=1;
factorial:=1;
For i:=1 to 2*N+1 do
factorial:=factorial*i;
pow:=pow*X;
if (i mod 2) <>0 then
Rez:=Rez+pow/factorial;
pow:=pow*(-1);
end;
Writeln(Rez);
end.
program For23;
var
X,Rez,factorial,pow:Real;
N, i :Integer;
begin
Write('Введите X: ');
Readln(X);
Write('Введите N: ');
Readln(N);
Rez:=0;
pow:=1;
factorial:=1;
For i:=1 to 2*N+1 do
begin
factorial:=factorial*i;
pow:=pow*X;
if (i mod 2) <>0 then
begin
Rez:=Rez+pow/factorial;
pow:=pow*(-1);
end;
end;
Writeln(Rez);
end.