Rust Factorial
Published 361d ago
nptester
Recursive factorial function in Rust
fn factorial(n: u64) -> u64 {
if n == 0 {
1
} else {
n * factorial(n - 1)
}
}
factorialrecursionRust
Please login or sign up to comment and collaborate