var a:array [1..10,1..8] of longint;
i,j,k,x:longint;
begin
for i:=1 to 10 do
for j:=1 to 8 do a[i,j]:=random(20)-10;
writeln ( 'Массив до изминений:' );
for i:=1 to 10 do
begin
for j:=1 to 8 do write ( a[i,j],' ' );
writeln;
end;
for i:=1 to 10 do
begin
for j:=1 to 8-1 do
for k:=j+1 to 8 do
if a[i,j]>a[i,k] then
begin
x:=a[i,j];
a[i,j]:=a[i,k];
a[i,k]:=x;
end;
end;
writeln ( 'Массив после изминений:' );
for i:=1 to 10 do
begin
for j:=1 to 8 do write ( a[i,j],' ' );
writeln;
end;
end.