-O
-O
.rs
fn main() {
println!("Hello world!");
}
use std::io;
fn main() {
let mut sum = 0;
loop {
let mut line = String::new();
if io::stdin().read_line(&mut line).expect("Error reading line") == 0 {
break;
}
for token in line.trim().split(" ") {
if !token.is_empty() {
let num: i32 = token.parse().expect("Not an integer");
sum += num;
}
}
}
println!("{}", sum);
}