fn main() {
let arr = [2, 5, 3, 1, 4]
let n = len(arr)
let c = 0
while c < n {
let d = 0
while d < n - c - 1 {
let current = arr[d]
let next = arr[d+1]
if current > next {
let swap = arr[d]
arr[d] = arr[d+1]
arr[d+1] = swap
}
d += 1
}
c += 1
}
println(arr)
}