var a,b:array[1..50,1..50] of real;
m,n,i,j,p,q,r:integer;
begin
write('m=');readln(m);
write('n=');readln(n);
for m:=1 to m do
for n:=1 to n do
begin
write;
readln(a[m,n]);
end;
writeln;
for m:=1 to m do
begin
for n:=1 to n do write(a[m,n]:5:0);
writeln;
end;
for j:=1 to n do
for i:=1 to m do
begin
r:=1;
for p:=1 to m do
begin
if not(p=i) then
if a[p,j]>a[i,j] then r:=r+1;{}
if a[p,j]=a[i,j] then
if i>p then r:=r+1
end;
b[r,j]:=a[i,j];
end;
writeln;
for p:=1 to m do
begin
for q:=1 to n do write(b[p,q]:5:0);
writeln;
end;
readln
end.
как её исправить ? кто нибудь подскажите!