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
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