Сделал
const
n = 15;
type
mas = array[1..n]of integer;
var
a: mas;
i, tranz, min, l: integer;
var
s, z: integer;
procedure SelectionSort(var A: mas; n: integer);
var
i, j, key, count, k, s: integer;
begin
for i := 1 to n do
begin
count := A[i]; key := i;
for j := i + 1 to n do
begin
if (A[key] > A[j]) then key := j; end;
if (key <> i) then
begin
for k := 1 to n do
write(a[k], ' ');
writeln;
A[i] := A[key];
A[key] := count;
end;
end;
end;
begin
for i := 1 to n do a[i] := n - i;
SelectionSort(a, n);
for i := 1 to n do
write(a[i], ' ');
writeln;
end.