Const n=10; var a:array[1..n] of integer; i,i1,num:integer; begin
for i:=1 to n do a[i]:=random(-100,100); for i:=1 to n-1 do begin for i1:=1 to n-i do begin if a[i1]>a[i1+1] then begin num:=a[i1]; a[i1]:=a[i1+1]; a[i1+1]:=num; end; end; end; for i:=1 to n do writeln(a[i],' '); end.
var
a:array[1..n] of integer;
i,i1,num:integer;
begin
for i:=1 to n do a[i]:=random(-100,100);
for i:=1 to n-1 do begin
for i1:=1 to n-i do begin
if a[i1]>a[i1+1] then begin
num:=a[i1];
a[i1]:=a[i1+1];
a[i1+1]:=num;
end;
end;
end;
for i:=1 to n do writeln(a[i],' ');
end.