add input.rs
This commit is contained in:
11
single_file_tests/input.rs
Normal file
11
single_file_tests/input.rs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
use std::{ io, error::Error, };
|
||||||
|
fn main() -> Result<(), Box<dyn Error>> {
|
||||||
|
let mut input = String::new();
|
||||||
|
|
||||||
|
println!("Please input: ");
|
||||||
|
io::stdin().read_line(&mut input)?;
|
||||||
|
|
||||||
|
println!("You typed: {}", input.trim());
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user