Question: Using c++, how would I do this? Lab: RandArray . In main() for now: do these - one at a time Declare and initialize an
Using c++, how would I do this?
Lab: RandArray . In main() for now: do these - one at a time Declare and initialize an array of 20 integers having random values from 0 to 99 Hint: Use rand()%100, and srand() . Write a loop that prints the array, with index values - Write a loop that finds and prints the smallest value Find & print the average of the largest and smallest Example: randArrayO] 42 -Write a loop that finds and prints the largest value -Get a value from the user and using a loop, search for the value in the array. If it is there, report any/all index values. (Might be more than one) If it is not, print a message saying it is not in the array 16
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
