var a: array[1..6,1..6] of integer;
i,j,max: integer;
begin
randomize;
writeln('матрица:');
for i:=1 to 6 do begin
for j:=1 to 6 do begin
a[i,j]:=random(21)-10;
write(a[i,j],' ');
end;
writeln;
max:=a[1,1];
for i:=1 to 6 do for j:=1 to 6 do if a[i,j]>max then max:=a[i,j];
for i:=1 to 6 do for j:=1 to 6 do if a[i,j]=max then a[i,j]:=0;
writeln('полученная матрица:');
for j:=1 to 6 do write(a[i,j],' ');
end.
var a: array[1..6,1..6] of integer;
i,j,max: integer;
begin
randomize;
writeln('матрица:');
for i:=1 to 6 do begin
for j:=1 to 6 do begin
a[i,j]:=random(21)-10;
write(a[i,j],' ');
end;
writeln;
end;
max:=a[1,1];
for i:=1 to 6 do for j:=1 to 6 do if a[i,j]>max then max:=a[i,j];
for i:=1 to 6 do for j:=1 to 6 do if a[i,j]=max then a[i,j]:=0;
writeln('полученная матрица:');
for i:=1 to 6 do begin
for j:=1 to 6 do write(a[i,j],' ');
writeln;
end;
end.