Question: (C++) Using passing by value or by reference, create the following four functions/procedures: void displayMenu(); int largest(int a, int b, int c); void mySort(int& a,
(C++) Using passing by value or by reference, create the following four functions/procedures:
void displayMenu();
int largest(int a, int b, int c);
void mySort(int& a, int& b, int& c);
void myPermutation(int& a, int& b, int& c);
where displayMenu prints a list of options to the console, largest returns the largest value among three input integers, mySort sorts the three integers in ascending order, and myPermutation applies a permutation to the numbers (that is, a list of numbers 1 2 3 will become 2 3 1 after the function call).
Your main function should take in three integers from the user, and then continuously display a menu of options and call the corresponding function based on the user input until the user enters Q.
Instructions: You may assume that the user always provides valid input. You may not use stdafx.h. Include header comments and function comments. You may not use any library other than .


ple run of your code may look like ode may look Iike: Enter your three integer numbers: 4 MENU 1. Output the largest 2. Get the next permutation 3. Sort in ascending order Enter your choice (1 - 3), Q to quit: 1 The largest number among the three is: 5 =MENU 1. Output the largest 2. Get the next permutation 3. Sort in ascending order Enter your choice (1 - 3), to quit: 3 After sorting: 3 4 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
