Вычислить значение Σ(x-1)^n /n*n, n=1 до 10 — Pascal(Паскаль)

const
  n = 10;

var
  i, j: integer;
  y, x, s: real;

begin
  x := -3;
  while x <= 3 do
    if x <> 0 then
    begin
      y := 0;
      for i := 1 to n do
      begin
        s := 1;
        for j := 1 to i do
          s := s * (x - 1);
        y := y + s / (n * n);
      end;
      writeln(' Dlea x=', x:4:2, ' y=', y:6:4);
      x := x + 0.1;
    end;
  readln;

end.

Leave a Comment

3 + = 4