Program lab_5; Uses crt; const N=4;M=4; var a:array[1..5,1..5] of integer; i,j,max,min,l,k:integer; Begin Randomize; clrscr; for i:=1 to M do begin for j:=1 to N do begin a[i,j]:=random(10); write(a[i,j]:3); end;writeln;end; min:=a[1,1]; for i:=1 to M do begin for j:=1 to N do begin if (a[i,j]>min) then begin min:=a[i,j]; l:=a[i,n]; a[i,n]:=min; a[i,j]:=l;end;end;end; for i:=1 to M do begin for j:=1 to N do begin max:=a[1,1]; if (a[i,j]