This challenge is about basic mathematical operations. You will be given 2 numbers a and b. You need to perform the following operations:
a and ba and ba and ba and bYou need to return a tuple containing the results of the above operations in the same order. (sum, difference, multiply, divide)
Note that every value in the tuple must be of type
i32.
let a = 10;
let b = 5;
let result = math_operations(a, b);
assert_eq!(result, (15, 5, 50, 2));In Rust you can use the following operators for the above operations:
+-*/Good luck!