blob: cc7f99d97bd3cc7735e7dfdd58be1f91fc089724 [file] [log] [blame]
def baal(int jjj) {
while (true)
println(<selection>fact</selection>(jjj))
}
int fact(int n) {
if (n > 0) {
return n * fact(n - 1)
}
else return 1
}
-----
def baal(int jjj) {
while (true) {
int result
if (jjj > 0) {
result = jjj * fact(jjj - 1)
} else result = 1
println(result)
}
}
int fact(int n) {
if (n > 0) {
return n * fact(n - 1)
}
else return 1
}