Skip to content

Instantly share code, notes, and snippets.

@trendsetter37
Created January 29, 2017 17:50
Show Gist options
  • Select an option

  • Save trendsetter37/cae42f6b26b936aa9e6567482f7b721f to your computer and use it in GitHub Desktop.

Select an option

Save trendsetter37/cae42f6b26b936aa9e6567482f7b721f to your computer and use it in GitHub Desktop.

Revisions

  1. trendsetter37 created this gist Jan 29, 2017.
    15 changes: 15 additions & 0 deletions main.rs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    use std::io;

    fn main() {
    let mut input = String::new();

    io::stdin().read_line(&mut input)
    .expect("Failed to read line.");

    let test_cases: u16 = input
    .trim() // trim new line char
    .parse()
    .expect("Failed to parse unsigned int.");

    println!("test_cases: {}", test_cases);
    }