let x = 123 tol = 1e-1 count = 0 println("The starting value of x is $x.") while x > tol x = x/2 count = count + 1 end println("Final value of x is $x, which is smaller than $tol.") println("It took $count iterations to achieve this result.") end