Files
simple-rust-tests/single_file_tests/input.rs
2020-04-20 01:20:37 +08:00

13 lines
282 B
Rust

use std::{ io, io::Write, error::Error, };
fn main() -> Result<(), Box<dyn Error>> {
let mut input = String::new();
print!("Please input: ");
io::stdout().flush().ok();
io::stdin().read_line(&mut input)?;
println!("You typed: {}", input.trim());
Ok(())
}