Question: do not use global variables. User will enter a value (N) which represents the number of values to process- user enters N numbers in the

 do not use global variables. User will enter a value (N)

which represents the number of values to process- user enters N numbers

in the range of -32768 to 32767 The values entered will be

do not use global variables.

User will enter a value (N) which represents the number of values to process- user enters N numbers in the range of -32768 to 32767 The values entered will be stored in an array of type short that has 1,000 elements- program will count the number of different (distinct/unique) values in the array- The count (number) of different values will be displayed (no other output is necessary) The user will input a request to find the Nth duplicate (example 5th) and its location in the array Examples - different values stored in the array.* Example: 2, 3, 4, 3, 3, 5, 2, 9, 5 count of unique values is 5; number of duplicates 4 Example: 10, 9, 8,7, 6, 5, 4, 3, 2, 5,1, count of unique values is 10; number of duplicates 1- Example: 10, 9, 8,7, 6, 5, 4, 3, 2,1, count of unique values is 10; number of duplicates 0 Example: 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 count of unique values is 1; number of duplicates 9v #includesiostream> // required header file for inputoutput- using namespace std; void input. data(short data[], short size);* void display data (short data[], short size); short count distinct(short num[], short size); // value returning function* short Find.Nth Duplicate(short num[], short size, short Nth, short &offset); value returning function*

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!