100-exercises-to-learn-rust/book/src/02_basic_calculator/05_factorial.md

318 B

Factorial

So far you've learned:

  • How to define a function
  • How to call a function
  • Which integer types are available in Rust
  • Which arithmetic operators are available for integers
  • How to execute conditional logic via comparisons and if/else expressions

It looks like you're ready to tackle factorials!