Var i, j, sum: integer; a: array[1..3, 1..4] of integer; begin writeln('Массив: '); for i := 1 to 3 do begin for j := 1 to 4 do begin a[i, j] := random(10); sum := sum + a[i, j]; write(a[i, j]:4); end; writeln; end; write('Сумма элементов массива: ', sum); end.
a: array[1..3, 1..4] of integer;
begin
writeln('Массив: ');
for i := 1 to 3 do begin
for j := 1 to 4 do begin
a[i, j] := random(10);
sum := sum + a[i, j];
write(a[i, j]:4);
end;
writeln;
end;
write('Сумма элементов массива: ', sum);
end.