Closed oakmanjacob closed 3 years ago
Under the "Generate random numbers within a range" section the rng.gen_range function is called with two parameters instead of submitting one range as is implemented in rand v0.8.0.
The lines:
println!("Integer: {}", rng.gen_range(0, 10)); println!("Float: {}", rng.gen_range(0.0, 10.0));
should be:
println!("Integer: {}", rng.gen_range(0..10)); println!("Float: {}", rng.gen_range(0.0..10.0));
The code compiling and running successfully on the website indicates that while this code is marked rand v0.8.0 it must be running rand v0.7.3 or before.
Under the "Generate random numbers within a range" section the rng.gen_range function is called with two parameters instead of submitting one range as is implemented in rand v0.8.0.
The lines:
should be:
The code compiling and running successfully on the website indicates that while this code is marked rand v0.8.0 it must be running rand v0.7.3 or before.