Question: Write a C++ program with functions as follows: (1) The function LNumbers is to be defined with two integer parameters, and returns an integer (the

Write a C++ program with functions as follows:

(1) The function LNumbers is to be defined with two integer parameters, and returns an integer (the largest of the two integers)

(2) The function MNumbers is to be defined with two integer pointer parameters, and returns an integer (the result of multiplication of the numbers)

(3) The function CNumbers is to be defined with two constant integer reference parameters, and returns true if the numbers are equal, false otherwise

(4) The function ANumbers 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

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!