This commit is contained in:
2021-07-16 20:12:04 -05:00
parent 27b391d161
commit a194be3fb7
2 changed files with 20 additions and 1 deletions

7
Cargo.lock generated Normal file
View File

@@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "guessing_game"
version = "0.1.0"

View File

@@ -1,3 +1,15 @@
fn main() { fn main() {
println!("Hello, world!"); println!("Guess the number!");
println!("Please input your guess.");
let mut guess = String::new();
std::io::stdin()
.read_line(&mut guess)
.expect("Failed to read line");
println!("You guessed: {}", guess);
} }