Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/Loops-While/OCaml/loops-while-1.ocaml
Normal file
5
Task/Loops-While/OCaml/loops-while-1.ocaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
let n = ref 1024;;
|
||||
while !n > 0 do
|
||||
Printf.printf "%d\n" !n;
|
||||
n := !n / 2
|
||||
done;;
|
||||
6
Task/Loops-While/OCaml/loops-while-2.ocaml
Normal file
6
Task/Loops-While/OCaml/loops-while-2.ocaml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
let rec loop n =
|
||||
if n > 0 then begin
|
||||
Printf.printf "%d\n" n;
|
||||
loop (n / 2)
|
||||
end
|
||||
in loop 1024
|
||||
Loading…
Add table
Add a link
Reference in a new issue