16 lines
331 B
Rust
16 lines
331 B
Rust
use std::io;
|
|
|
|
fn calc(a: i64, b: i64) -> i64 {
|
|
a + b
|
|
}
|
|
|
|
fn main(){
|
|
let mut s = String::new();
|
|
io::stdin().read_line(&mut s).unwrap();
|
|
let x: Vec<i64> = s
|
|
.split_whitespace()
|
|
.map(|x| x.parse::<i64>().unwrap())
|
|
.collect();
|
|
println!("You've Typed {:?}, Sum is {}", x, calc(x[0], x[1]));
|
|
}
|