program summa_1_1_x_2;
var
x,s:real;
i,f,n:byte;
begin
writeln('Рассчет S=1+x^1/1!+x^2/2!+...x^n/n!');
write('Введите x》');
read(x);
write('Введите n》');
read(n);
s:=2;
f:=1;
for i:=2 to n do
x:=x*x;
f:=f*i;
s:=s+x/f;
end;
write('S=',s)
end.
program summa_1_1_x_2;
var
x,s:real;
i,f,n:byte;
begin
writeln('Рассчет S=1+x^1/1!+x^2/2!+...x^n/n!');
write('Введите x》');
read(x);
write('Введите n》');
read(n);
s:=2;
f:=1;
for i:=2 to n do
begin
x:=x*x;
f:=f*i;
s:=s+x/f;
end;
write('S=',s)
end.