started book again
This commit is contained in:
12
book/guessing_game/src/main.rs
Normal file
12
book/guessing_game/src/main.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use std::io;
|
||||
// file:///home/luket/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/share/doc/rust/html/std/io/index.html
|
||||
|
||||
fn main() {
|
||||
println!("guess the number");
|
||||
println!("your guess: ");
|
||||
let mut guess = String::new();
|
||||
io::stdin()
|
||||
.read_line(&mut guess)
|
||||
.expect("failed to read line");
|
||||
println!("your guess: {guess}");
|
||||
}
|
Reference in New Issue
Block a user