Question: Write a C + + program that generates an integer random vector array of size N . The size of the array is entered from

Write a C++ program that generates an integer random vector array of size N.
The size of the array is entered from the keyboard and must not exceed 40. The
program then:
A. Generates random numbers between 1 and 5(inclusive) and stores them
in the vector array.
B. Display the generated vector array.
C. Display a second output in 2 column list. The first column is a list of the
distinct array elements in the array; the second column is the count of the
number of occurrences of each element in the vector array. The list should
be sorted on entries in the first column, largest to smallest.
D. Remove the duplicate numbers from the same generated vector array
and display the array after all duplicate numbers were removed.
E. Sort the vector array that was generated from the previous step in an
ascending order from lowest to highest. Display the sorted vector array.
Process A thru E should be repeated until the user terminates the
program.
Must Use functions to implement part A-E. Must pass the
vector array to each function.
Not allowed to use classes.
You are not allowed to use multiple arrays. Only the original
generated vector array.
 Write a C++ program that generates an integer random vector array

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!