Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions

Question

Describe the components of a job description.

Answered: 1 week ago

Question

3. Is there opportunity to improve current circumstances? How so?

Answered: 1 week ago

Question

2. How will you handle the situation?

Answered: 1 week ago