update ch02-00 close #505

pull/506/head
KaiserY 4 years ago committed by GitHub
parent 177852f196
commit e4143bd47e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -362,7 +362,7 @@ use rand::Rng;
fn main() { fn main() {
println!("Guess the number!"); println!("Guess the number!");
let secret_number = rand::thread_rng().gen_range(1, 101); let secret_number = rand::thread_rng().gen_range(1..101);
println!("The secret number is: {}", secret_number); println!("The secret number is: {}", secret_number);
@ -370,7 +370,8 @@ fn main() {
let mut guess = String::new(); let mut guess = String::new();
io::stdin().read_line(&mut guess) io::stdin()
.read_line(&mut guess)
.expect("Failed to read line"); .expect("Failed to read line");
println!("You guessed: {}", guess); println!("You guessed: {}", guess);

Loading…
Cancel
Save