Doing some C learnin'.

Also, reformatted all the problems.
This commit is contained in:
2018-03-15 10:08:01 -05:00
parent 16ffec256f
commit 986d17f104
31 changed files with 1470 additions and 58 deletions

20
2016/day01/helpers.rs Normal file
View File

@@ -0,0 +1,20 @@
use std::io;
pub fn read_std_in() -> String {
let mut input = String::new();
let mut done = false;
while !done {
match io::stdin().read_line(&mut input) {
Ok(n) => {
if n == 0 {
done = true;
}
},
Err(error) => {
println!("error: {}", error);
done = true;
},
}
}
input
}