-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1001.rs
More file actions
26 lines (19 loc) · 788 Bytes
/
1001.rs
File metadata and controls
26 lines (19 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use std::io;
// Main Functions
fn main() {
let mut input1 = String::new();
io::stdin().read_line(&mut input1).expect("Failed to read
line");
let mut input2 = String::new();
io::stdin().read_line(&mut input2).expect("Failed to read
line");
// Converting string to integer
let aint: i32 = input1.trim().parse().ok().expect("Program
only
processes numbers, Enter number");
let bint: i32 = input2.trim().parse().ok().expect("Program
only
processes numbers, Enter number");
// Output of basic operations
println!("X = {}", aint + bint);
}