Question: Q 4 Write the following function ( 5 marks ) : Name: MinMaxEvenOdd Parameters: int N , int a , int b Job: The function
Q Write the following function marks:
Name: MinMaxEvenOdd
Parameters: int int int
Job: The function will generate and output random numbers from to including a and Assume that and N are greater than O It will return the maximum even and minimum odd of the generated N random numbers using two int reference parameters maxEven and minOdd respectively. If there is no maximum even then the parameter maxEven is set to Similarly, if there is no minimum odd then the parameter minOdd is set to
The main is provided. You only need to write the function. No need to write the full program or any #include statements.
int maino
srandtime;
int MaxEven, MinOdd;
cout Enter and b : ;
cin ;
MinMaxEvenOddN a b MaxEven, MinOdd;
cout "Maximum Even MaxEven
cout Minimum Odd MinOdd endl;
return ;
Write the function here and continue the other side the page required.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
