pub fn factorial(n: usize) -> usize {
    if n > 19 {
        panic!("Negative or too large number")
    }

    if n > 2 {
        n * factorial(n - 1)
    } else {
        2
    }
}
/// Calculate the factorial of a non-negative integer n
///     n is set to be less than 20 to avoid overflow issue  
Calculate the factorial of a non-negative integer n
n is set to be less than 20 to avoid overflow issue
Calculate the factorial of a non - negative integer n n is set to be less than 20 to avoid overflow issue
pub fn factorial(n: usize) -> usize {
    if n > 19 {
        panic!("Negative or too large number")
    }
    if n > 2 {
        n * factorial(n - 1)
    } else {
        2
    }
}
pub fn factorial ( n : usize ) -> usize { if n > 19 { panic ! ( " " ) } if n > 2 { n * factorial ( n - 1 ) } else { 2 } }
Calculate the factorial of a non-negative integer n
n is set to be less than 20 to avoid overflow issue
Calculate the factorial of a non - negative integer n n is set to be less than 20 to avoid overflow issue
n
usize
n
usize