Question: In c++ please explain a. Write a function that accepts two integers as arguments and uses a reference to store the largest integer in a

In c++ please explain

a. Write a function that accepts two integers as arguments and uses a reference to store the largest integer in a variable in a calling function.

b. Write a function that returns a random integer from min to max. It accepts min and max as arguments.

c. Write a function that returns an average of n random integers from min to max. It accepts min, max and n as arguments. (Use one of the above functions.)

d. Write a function that asks a user for min and max. Use one of the above functions to get the average of 1000 random integers from min to max. Use one of the above functions to average min and max. Print the results. What do you observe?

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!