Question: Code in C++ please! 1) Write a function that takes as an input parameter an array of integers and a length parameter (or, if you
Code in C++ please!
1) Write a function that takes as an input parameter an array of integers and a length parameter (or, if you really want to, you can use size-of). It prints out the array, and returns nothing.
2) Write a function that takes as input parameters (using call by pointer) 3 integers. It generates a random number between 25 and 50 (not including 50). It then creates an array on the memory heap of that length. It generates a random high number (mine was between 5 and 10) and a random low number (between -5 and -10) and fills in the array iteratively with random numbers between the high and the low numbers*, and it returns that array. The input parameters should be modified so that it holds the length of the array, the high value, and the low value. Make a second version of the above function, only in this case, instead of using a for or a while loop, it calls a recursive function to fill in the array with random numbers between the high and the low as defined above (so this function works exactly the same as the above function in terms of input and output. However, for the loop that fills the array, it calls a recursive function that you must write to fill in the random numbers). (Not aloud to use built in #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
