You are on page 1of 1

integer a[] int n,i n=lb_1.

TotalItems() int j,k, aux,p

for k=1 to n a[k]=integer(lb_1.text(k)) next

for k=1 to n - 1 for j=1 to n - 1 if a[j]>a[j+1] then aux=a[j] a[j]=a[j+1] a[j+1]=aux end if next next

for k=1 to n p=a[k] lb_2.AddItem(string(p)) next

You might also like