Var i, j, max, n, m: integer; ar: array[,]of integer; begin readln(n, m); setlength(ar, n, m); for i := 0 to n - 1 do for j := 0 to m - 1 do ar[i, j] := random(0, 100); max := ar[0, 0]; for i := 0 to n - 1 do begin for j := 0 to m - 1 do begin if(ar[i, j] > max) then max := ar[i, j]; end; end; writeln('Максимальный элемент: ', max); for i := 0 to n - 1 do begin for j := 0 to m - 1 do write(ar[i, j]:4, ' '); writeln; end; end.
i, j, max, n, m: integer;
ar: array[,]of integer;
begin
readln(n, m);
setlength(ar, n, m);
for i := 0 to n - 1 do
for j := 0 to m - 1 do ar[i, j] := random(0, 100);
max := ar[0, 0];
for i := 0 to n - 1 do
begin
for j := 0 to m - 1 do
begin
if(ar[i, j] > max) then max := ar[i, j];
end;
end;
writeln('Максимальный элемент: ', max);
for i := 0 to n - 1 do
begin
for j := 0 to m - 1 do write(ar[i, j]:4, ' ');
writeln;
end;
end.