1. Write a program with a function that returns a random integer between 0 and an integer supplied as an argument. Query the user for a value and then generate a column of that length with random numbers between one and that number. For example:
What number? 8
//compile in c++ and explain please
2. A ball falls to ground from 1000 feet and bounces back 33% of the previous height each time. Determine the total distance the ball traveled when the ball hits the ground for the 10th time. How high it will rise after the 10th bounce? In your program, write a function to calculate how high the ball bounces given the previous height.
//compile in c++ and explain please