-
-
Save aslan144/48bb97adb8750dd7d2b0fb5a0f3efee5 to your computer and use it in GitHub Desktop.
rust #rr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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