Question: please answer in c++, use the same frozen code thats given and add the rest for it to work. thank you :) Synopsis: Given 2


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.g. 41=4. You could also use a certain function available with the cmath> library to achieve this as well without having to multiply anything. - Since Modify () is of void 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 Note: OnlineGDB is not a human and therefore won't be able to distinguish the correct output from the incorrect output. If something doesn't match, it will immediately count the Test Case as failed. So for the sake of this assignment, please don't include prompt statements in this program! Topics that will help you towards forming your solution: - C++ Syntax/Semantics - C++Input/Output - C++ Variables and Identifiers - C++ Datatypes - C++ Operators - C++ Maths - Ct+ Conditionals Course:Author:Date:Description:CSC1160
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
