do
if (mass[j] > mass[j+1]) then
begin
buf := mass[j];
mass[j] := mass[j+1];
mass[j+1] :=
buf;end;