RosettaCodeData/Task/Loops-While/OCaml/loops-while-1.ocaml

6 lines
83 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
let n = ref 1024;;
while !n > 0 do
Printf.printf "%d\n" !n;
n := !n / 2
done;;