13 lines
132 B
Plaintext
13 lines
132 B
Plaintext
import io
|
|
|
|
main() {
|
|
io.number(factorial(5))
|
|
}
|
|
|
|
factorial(x int) -> int {
|
|
if x <= 1 {
|
|
return 1
|
|
}
|
|
|
|
return x * factorial(x - 1)
|
|
} |