mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-04-09 22:08:06 +08:00
16 lines
271 B
Rust
16 lines
271 B
Rust
|
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);
|
||
|
}
|