Factorial Number

    0

    0

    Giovanny Gongora

    fn factorial(num: i32) -> i32 {
      match num {
        0 | 1 => 1,
        _ => factorial(num - 1) * num,
      }
    }
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.