started book again

This commit is contained in:
2023-05-02 09:25:21 -04:00
parent f4dc4f8a43
commit 36e2990305
10 changed files with 172 additions and 2 deletions

View File

@@ -0,0 +1,8 @@
[package]
name = "guessing_game"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View 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}");
}