Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main(){
- let mut x_string: String = String::new();
- let mut y_string: String = String::new();
- println!("X?");
- let _ = std::io::stdin().read_line(&mut x_string);
- println!("Y?");
- let _ = std::io::stdin().read_line(&mut y_string);
- let x: Result<i32, _> = x_string.parse();
- let y: Result<i32, _> = y_string.parse();
- let mut z = x+y;
- println!("Z: {z}");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement