Write a function named compute that calculates the sum and product of two 16-bit signed integers and returns both results using reference parameters.
compute
Function Requirements:
a
b
int16_t
sum
product
int32_t
sum = a + b
product = a * b
In main():
compute(a, b, sum, product)
Example
Input:
30000 2
Output:
30002 60000
Constraints:
-32768 to 32767
<cstdint>
Test Cases
Test Results
Input
3 4
Expected Output
7 12