13 lines
123 B
Plaintext
Raw Normal View History

2024-07-30 14:36:33 +00:00
import log
2024-07-18 16:08:30 +00:00
2024-07-15 14:51:36 +00:00
main() {
2024-07-30 14:36:33 +00:00
log.number(factorial(5))
2024-07-15 14:51:36 +00:00
}
factorial(x) {
if x <= 1 {
return 1
}
return x * factorial(x - 1)
}