13 lines
123 B
Plaintext
13 lines
123 B
Plaintext
import log
|
|
|
|
main() {
|
|
log.number(factorial(5))
|
|
}
|
|
|
|
factorial(x) {
|
|
if x <= 1 {
|
|
return 1
|
|
}
|
|
|
|
return x * factorial(x - 1)
|
|
} |