Browse Source

Print input from stdin

master
Luke Childs 8 years ago
parent
commit
df74d19be6
  1. 8
      src/main.rs

8
src/main.rs

@ -1,3 +1,9 @@
use std::io;
use std::io::prelude::*;
fn main() {
println!("Hello, world!");
let stdin = io::stdin();
for line in stdin.lock().lines() {
println!("{}", line.unwrap());
}
}

Loading…
Cancel
Save