rand number.
This commit is contained in:
parent
595834469e
commit
4a21a93e6c
@ -1,6 +1,11 @@
|
|||||||
use std::io;
|
use std::io;
|
||||||
|
use rand::Rng;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
let secret_number = rand::thread_rng().gen_range(1..101);
|
||||||
|
|
||||||
|
println!("Secret number is {:?}", secret_number);
|
||||||
|
|
||||||
println!("Guessing a number:");
|
println!("Guessing a number:");
|
||||||
|
|
||||||
let mut guess_number = String::new();
|
let mut guess_number = String::new();
|
||||||
|
Loading…
Reference in New Issue
Block a user