Question
1.) Write a C++ program with functions as follows: In the main function, you should read two integers from the standard input and call the
1.) Write a C++ program with functions as follows:
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.
a. The function LNumbers is to be defined with two integer parameters, and returns an integer (the largest of the two integers)
b. The function MNumbers is to be defined with two integer pointer parameters, and returns an integer (the result of multiplication of the numbers)
c. The function CNumbers is to be defined with two constant integer reference parameters, and returns true if the numbers are equal, false otherwise
d. 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started