// Calculate factorial fn factorial(n: u64) -> u64 { (1..=n).product() } fn main() { println!("Factorial = {} ", factorial(5) ); }