program massiv_zamena_min_max;
uses crt;
var massiv: array [1..100,1..100] of integer;
i,j,mr,mc,min, max, minj, maxj, tmp:integer;
begin
clrscr;
mr:=101;
mc:=101;
while ((mr>100)or(mr<0)or(mc>100)or(mc<0)) do<br>begin
writeln('Vvedite razmernost massiva (ne bolee chem 100x100):');
readln(mr);
readln(mc);
end;
for i:=1 to mr do
for j:=1 to mc do
begin
writeln('Vvedite element massiva nomer ',(i-1)*mc+j,':');
readln(massiv[i,j]);
end;
writeln('Massiv do izmeneniya:');
for i:=1 to mr do
begin
for j:=1 to mc do write(massiv[i,j],' ');
writeln;
end;
min:=massiv[1,1];
minj:=1;
for i:=1 to mr do
for j:=1 to mc do
if massiv[i,j]begin
min:=massiv[i,j];
minj:=j;
end;
max:=massiv[1,1];
maxj:=1;
for i:=1 to mr do
for j:=1 to mc do
if massiv[i,j]>max then
begin
maX:=massiv[i,j];
maxj:=j;
end;
for i:=1 to mr do
begin
tmp:=massiv[i,minj];
massiv[i,minj]:=massiv[i,maxj];
massiv[i,maxj]:=tmp;
end;
writeln('Nomer ctolbca s minimalnym elementom: ',minj);
writeln('Nomer ctolbca s maximalnym elementom: ',maxj);
writeln('Massiv posle izmeneniya:');
for i:=1 to mr do
begin
for j:=1 to mc do write(massiv[i,j],' ');
writeln;
end;
readln;
end. Это решение