Home /
Expert Answers /
Computer Science /
the-program-below-is-to-find-the-largest-number-maximum-of-two-2-integer-numbers-rewrite-the-pa671
(Solved):
The program below is to find the largest number (maximum) of TWO (2) integer numbers. Rewrite the ...
The program below is to find the largest number (maximum) of TWO (2) integer numbers. Rewrite the program to find the largest number of THREE (3) integer numbers. The system will prompt the user to input the integer number and the system will display an error message for the wrong input. #include using namespace std; int \( \max ( \) int \( x \), int \( y) \) \{ if \( (x>y) \) return \( x \); else return \( y \); \} int main() \{ int \( a=10, b=20 \); // Calling above function to find max of ' \( a \) ' and ' \( b \) ' int \( m=\max (a, b) \); cout \( \ll \) "m is " \( \ll m \); return 0 ;