Bookmark - ch2

This commit is contained in:
Maximilian Giller 2024-03-25 01:27:43 +01:00
parent ae5b610260
commit c56962282e
3 changed files with 24 additions and 1 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,15 @@
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}");
}

View file

@ -2,4 +2,4 @@
Me learning Rust. Me learning Rust.
[Interactive Book](https://rust-book.cs.brown.edu/) [Interactive Book(mark)](https://rust-book.cs.brown.edu/ch02-00-guessing-game-tutorial.html)