Pascal
var
z: array[1..8] of integer;
i, s:integer;
begin
s:=0;
for i:= 1 to 8 do begin
z[i]:=i*i+1;
write(z[i],' ');
s:=s+z[i];
end;
writeln();
write('Сумма элементов = ', s)
end.
Pascal
var
z: array[1..8] of integer;
i, s:integer;
begin
s:=0;
for i:= 1 to 8 do begin
z[i]:=i*i+1;
write(z[i],' ');
s:=s+z[i];
end;
writeln();
write('Сумма элементов = ', s)
end.