repo.or.cz
/
minnow.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Initial commit
[minnow.git]
/
samples
/
counter2.mno
blob
489ae2b6594091f5ad874251c6af761a09140102
1
def int counter(int i)
2
var int total = 0
3
while (i > 0)
4
total = total + 1
5
i = i - 1
6
end
7
return(total)
8
end
9
10
action main(string[] args)
11
var int i = convertToInt(args[0])
12
var int total
13
14
total = counter(i)
15
16
puti(total)
17
exit(0)
18
end