diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2016-06-09 19:00:20 -0400 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2016-06-09 19:00:20 -0400 |
commit | bd52727d465a777ee749b6649ca768ffe7e900b0 (patch) | |
tree | 831975b48c6fb00c434582a2d14a5a2db4ea2f4d /rust | |
parent | b0774a09f67ee2da51b290ba625cc407be8b2518 (diff) |
Hello, Rust!
Diffstat (limited to 'rust')
-rw-r--r-- | rust/hello.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rust/hello.rs b/rust/hello.rs new file mode 100644 index 0000000..851beed --- /dev/null +++ b/rust/hello.rs @@ -0,0 +1,6 @@ +use std::io; +fn main() { + let mut name = String::from("World"); + io::stdin().read_line(&mut name).ok(); + println!("Hello, {}", name); +} |