Question: Please do in C++. Thank you! Synopsis Given 2 input numbers (each on a separate line), complete the Modify() function so that the values of

 Please do in C++. Thank you! Synopsis Given 2 input numbers

(each on a separate line), complete the Modify() function so that the

Please do in C++. Thank you!

Synopsis Given 2 input numbers (each on a separate line), complete the Modify() function so that the values of the 2 numbers can be changed in memory. Once the values are updated: - x should store the sum of the 2 input numbers. - y should store the absolute difference of the 2 input numbers. Hints: - In mathematics, the absolute difference is basically if a subtraction between 2 numbers leads to a negative result, the absolute of that would be positive. e.g. 610=4=4. Thus, one way you could achieve this is by multiplying the absolute difference with 1. e.9. 41=4. You could also use a certain function available with the library to achieve this as well without having to multiply anything. - Since Modify() is of vold type, there is no return. To-Do: Write a C++ program that prints the results of given input numbers based on the rules defined above. Note: you are NOT allowed to change the parameters of the Modify.() function. you must work on it as-is. Sample Input/Output1: Input 1006 771 Qutput 1777 235 Sample InputOutput2: Input

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!