Last active
July 10, 2016 17:15
-
-
Save dumindu/4cc16adf075a89ab71496969f8a6f245 to your computer and use it in GitHub Desktop.
application breaks on line16
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() { | |
let i_default: u64 = 4; | |
let d_default: f64 = 4.0; | |
let s_default = "HackerRank ".to_string(); | |
let mut input = String::new(); | |
println!("Type second integer!"); | |
io::stdin().read_line(&mut input).unwrap(); | |
let i_input: u64 = input.trim().parse().unwrap(); | |
println!("Type second double!"); | |
io::stdin().read_line(&mut input).unwrap(); | |
let d_input: f64 = input.trim().parse().unwrap(); | |
println!("Type second string!"); | |
io::stdin().read_line(&mut input).unwrap(); | |
let s_input = input.trim(); | |
println!("{}\n{}\n{}", i_default + i_input, d_default + d_input, s_default + &s_input); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment