Working on the rust book moar

This commit is contained in:
Dan Buch
2016-08-30 22:49:38 -04:00
parent 7e650db47f
commit 051f50ec61
5 changed files with 16 additions and 5 deletions

14
guessing_game/src/main.rs Normal file
View File

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