Showing
1 changed file
with
8 additions
and
3 deletions
1 | use std::io; | 1 | use std::io; |
2 | 2 | ||
3 | fn main() { | 3 | fn main() { |
4 | - let mut input = String::new(); | 4 | + loop { |
5 | - io::stdin().read_line(&mut input); | 5 | + let mut input = String::new(); |
6 | - print!("{}", input); | 6 | + io::stdin().read_line(&mut input); |
7 | + if input == "exit\n" { | ||
8 | + return; | ||
9 | + } | ||
10 | + print!("{}", input); | ||
11 | + } | ||
7 | } | 12 | } | ... | ... |
-
Please register or login to post a comment