Update guessing game usage of rand

This commit is contained in:
2021-09-12 15:12:16 -04:00
parent f45663f248
commit 7e6a2ea52b
3 changed files with 36 additions and 129 deletions

View File

@@ -5,7 +5,7 @@ use std::io;
fn main() {
println!("Guess the number!");
let secret_number = rand::thread_rng().gen_range(1, 101);
let secret_number = rand::thread_rng().gen_range(1..=100);
loop {
println!("Please input your guess.");