procedure k1(n:integer;x:mat;k2:string;var z:mat);
var i,j,l,k,t:integer;
b:array [1..10] of integer;
begin
if (k2='>') then begin
k:=0;
for i:=1 to n do
for j:=1 to n do begin
k:=k+1;
b[k]:=x[i,j];
end;
for l:=k downto 2 do
for i:=1 to k-1 do
if (b[i+1]>b[i]) then begin
t:=b[i];b[i]:=b[i+1];b[i+1]:=t;
end;
k:=0;
For i:=1 to n do
for j:=1 to n do begin
k:=k+1;x[i,j]:=b[k];
end;
end;
Сортировка матрицы, в чём ошибка? |