main.rs
This commit is contained in:
parent
d267e73b24
commit
f49de5ddb3
1 changed files with 11 additions and 0 deletions
11
main.rs
Normal file
11
main.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
use rand::Rng;
|
||||
fn main() {
|
||||
println!("Guess the number!");
|
||||
|
||||
println!("Please input your guess.");
|
||||
let mut secretnumber: i32 = rand::thread_rng().gen_range(1..=3);
|
||||
let mut guess = String::new();
|
||||
if guess == secretnumber {
|
||||
println!("Tot");
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue