Anonymous user
Loops/While: Difference between revisions
added ocaml
(added perl and python) |
(added ocaml) |
||
Line 52:
make "n 1024
while [:n > 0] [print :n make "n :n / 2]
=={{header|OCaml}}==
<ocaml>let n = ref 1024;;
while !n > 0 do
Printf.printf "%d\n" !n;
n := !n / 2
done;;</ocaml>
=={{header|Perl}}==
|