Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Loops-Break/OCaml/loops-break.ocaml
Normal file
18
Task/Loops-Break/OCaml/loops-break.ocaml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Random.self_init();;
|
||||
- : unit = ()
|
||||
|
||||
# while true do
|
||||
let a = Random.int 20 in
|
||||
print_int a;
|
||||
print_newline();
|
||||
if a = 10 then raise Exit;
|
||||
let b = Random.int 20 in
|
||||
print_int b;
|
||||
print_newline()
|
||||
done;;
|
||||
15
|
||||
18
|
||||
2
|
||||
13
|
||||
10
|
||||
Exception: Pervasives.Exit.
|
||||
Loading…
Add table
Add a link
Reference in a new issue