Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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++
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
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