We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9953362 commit 1b9a276Copy full SHA for 1b9a276
src/science/mathematics/miscellaneous/big-integers.md
@@ -9,7 +9,7 @@ use num::bigint::{BigInt, ToBigInt};
9
10
fn factorial(x: i32) -> BigInt {
11
if let Some(mut factorial) = 1.to_bigint() {
12
- for i in 1..(x+1) {
+ for i in 1..=x {
13
factorial = factorial * i;
14
}
15
factorial
0 commit comments