fn factorial(num: i32) -> i32 {
        match num {
          0 | 1 => 1,
          _ => factorial(num - 1) * num,
        }
      }
      
      Rust language logo

      Factorial Number

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.