program bublina;
uses crt;
var i,k,p: integer;
var a: array [1..20] of integer;
begin
  randomize;
  clrscr;
  for i:= 1 to 15 do begin
    a[i]:= random(100)+1; write(a[i],'  ');
  end;
  for k:= 1 to 14 do begin
    for i:=1 to 15-k do
      if a[i] > a[i+1] then begin
        p:=a[i]; a[i]:=a[i+1]; a[i+1]:=p;
      end;
  end;
  writeln;
  writeln('zoradene to je takto');
  for i:=1 to 15 do write(a[i],'  ');
  readln;
end.
