vari, sum, n: integer;beginsum := 0;n := 1;
for i := 1 to 8 dobeginsum := sum + n;n := n * 2;end;
writeln('Сумма ряда = ', sum);end.
var
i, sum, n: integer;
begin
sum := 0;
n := 1;
for i := 1 to 8 do
begin
sum := sum + n;
n := n * 2;
end;
writeln('Сумма ряда = ', sum);
end.