Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. use std::io::{self, Read, Result, Write};
  2.  
  3. fn main() -> Result<()> {
  4. let mut stdout = io::stdout();
  5. let mut stdin = io::stdin();
  6. let mut string = String::new();
  7.  
  8. writeln!(stdout, "What is your name? ")?;
  9. stdin.read_to_string(&mut string)?;
  10. writeln!(stdout, "Hello, {}, nice to meet you", string)?;
  11.  
  12. Ok(())
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement