program lab8;
var
n,i,fact:integer;
s:real;
x,a:real;
begin
write('Введите x=');
read(x);
write('Введите n=');
read(n);
fact:=3;
s:=1/4;
a:=1;
for i:=1 to n do
begin
s:=s+(a*sqr(2*i+1))/(fact*sqr(2*i+2));
fact:=fact*(2*i+1);
a:=a*x;
end;
writeln('s=',s:6:3);
end.
program lab8;varn,i,fact:integer; x,a,s:real;beginwrite('Введите x=');readln(x);write('Введите n=');readln(n);fact:=1;s:=1/4;a:=1;for i:=2 to n dobeginfact:=fact*(2*i-2)*(2*i-1);a:=a*x;s:=s+(a*sqr(2*i-1))/(sqr(2*i)*fact);end;writeln('s=',s:6:3);end.Пример:Введите x=2Введите n=5s= 0.462