Question: Write a C++ program with functions as follows: (1) The function MaxNumbers is to be defined with two integer parameters, and returns an integer (the
Write a C++ program with functions as follows: (1) The function MaxNumbers is to be defined with two integer parameters, and returns an integer (the largest of the two integers) (2) The function MultNumbers is to be defined with two integer pointer parameters, and returns an integer (the result of multiplication of the numbers) (3) The function CompNumbers is to be defined with two constant integer reference parameters, and returns true if the numbers are equal, false otherwise (4) The function AddNumbers is to be defined with two integer reference parameters with return type void. The sum of the numbers is to be returned through the first parameter. In the main function, you should read two integers from the standard input and call the functions for addition, multiplication, comparison, and finding the largest of the numbers read. The results returned by the functions should be displayed with appropriate messages.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
