2024-08-05 18:47:24 +02:00

13 lines
134 B
Plaintext

import log
main() {
log.number(factorial(5))
}
factorial(x Int) -> Int {
if x <= 1 {
return 1
}
return x * factorial(x - 1)
}