Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::io::{self, Read, Result, Write};
- fn main() -> Result<()> {
- let mut stdout = io::stdout();
- let mut stdin = io::stdin();
- let mut string = String::new();
- writeln!(stdout, "What is your name? ")?;
- stdin.read_to_string(&mut string)?;
- writeln!(stdout, "Hello, {}, nice to meet you", string)?;
- Ok(())
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement