Program enot; const m=15; var a: array[1..m] of integer; i, j, k: integer; begin for i := 1 to m do a[i] := random(21)+10; for i := 1 to m-1 do for j := 1 to m-i do if a[j] < a[j+1] then begin k := a[j]; a[j] := a[j+1]; a[j+1] := k end; write ('Отсортированный массив: '); for i := 1 to m do write (a[i]:4); end.
const m=15;
var a: array[1..m] of integer;
i, j, k: integer;
begin
for i := 1 to m do
a[i] := random(21)+10;
for i := 1 to m-1 do
for j := 1 to m-i do
if a[j] < a[j+1] then begin
k := a[j];
a[j] := a[j+1];
a[j+1] := k
end;
write ('Отсортированный массив: ');
for i := 1 to m do
write (a[i]:4);
end.