nitlanguage
/
nit.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge: Loader refactor
[nit.git]
/
examples
/
rosettacode
/
loops_do_while.nit
1
#!/usr/bin/env nit
2
#
3
# This file is part of NIT ( http://www.nitlanguage.org ).
4
# This program is public domain
5
6
# Task: Loops/Do-while
7
#
8
# SEE: http://rosettacode.org/wiki/Loops/Do-while
9
module
loops_do_while
10
11
var
val
=
0
12
loop
13
val
+=
1
14
print val
15
if
val
%
6
==
0
then break
16
end