This commit is contained in:
2025-09-23 17:49:01 +08:00
parent 699e600b4b
commit b36ca08813
3 changed files with 23 additions and 0 deletions

7
code/guessing_game/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 = 4
[[package]]
name = "guessing_game"
version = "0.1.0"

View File

@@ -0,0 +1,6 @@
[package]
name = "guessing_game"
version = "0.1.0"
edition = "2024"
[dependencies]

View File

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