Question: C++ a) Create a loadArray Function that loads an array of random numbers between 1 and 150. Pass to the function as parameter the Array,

C++

C++ a) Create a loadArray Function that loads an array of random

a) Create a loadArray Function that loads an array of random numbers between 1 and 150. Pass to the function as parameter the Array, the capacity of the array and the number of values needed. b) Create a printRange function which prints all values of the array between A and B inclusive. The function parameters should be the array, the number of elements and the two values (low value and high value) to output on. c) In main code create a random number between 10 and 30 to determine how many random numbers are needed (num_Elements) in the array. Also in main code accept the range's low and high value to output on. Call the init function and the print function. Examples If the random number array is 45,22,33,99,125,8,24,78,26,134,11,112 and the low value is 18 and the high value is 63 , this function prints 45,22,33,24,26. If the array is 126,112,64,29,3,87,69,144,29,39,111,89,93,67 and the low value is 100 and the high value is 148 , this function prints 126,112,144,111

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!