Skip to content

Instantly share code, notes, and snippets.

@aslan144
Last active September 17, 2017 00:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aslan144/48bb97adb8750dd7d2b0fb5a0f3efee5 to your computer and use it in GitHub Desktop.
Save aslan144/48bb97adb8750dd7d2b0fb5a0f3efee5 to your computer and use it in GitHub Desktop.
rust #rr
use std::io;
fn main() {
println!("Type something");
let mut line = String::new();
io::stdin()
.read_line(&mut line)
.expect("Failed to read line");
let input: u32 = line
.trim()
.parse()
.expect("Wanted a number");
println!("{}", input);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment