Miscellany
public text v1 · immutableprogram stulpeliai;
const N = 5;
var i: integer;
type Masyvas = array [1..N] of integer;
procedure burbulas (var x: Masyvas);
var a, j, k: integer;
keitimas: boolean;
begin
k:=N;
repeat
keitimas := false;
for j := 2 to k do
if x[j-1] > x[j] then
begin
a := x[j-1];
x[j-1] := x[j];
x[j] := a;
keitimas := true
end;
k := k - 1
until not keitimas
end;
begin
i:=1;
while i > 0 do begin
readLn(i);
burbulas(i);
writeLn(burbulas(i));
end.