const
n = 10;
x = 1;
y = 20;
var
arr: array[1..n] of integer;
tmp: integer;
begin
randomize;
write('Массив: ');
for var m := 1 to n do
begin
arr[m] := random(x, y);
write(arr[m], ' ');
end;
for var i := 1 to n do
begin
for var j := 1 to n - 1 do
begin
if (arr[j] < arr[j + 1]) then
begin
tmp := arr[j];
arr[j] := arr[j + 1];
arr[j + 1] := tmp;
end;
end;
end;
writeln();
write('После сортировки: ');
for var i := 1 to n do
write(arr[i], ' ');
end.