Question: Write a program that inputs a list of integers (greater than or equal to 1)from the user, and creates an array of integers with no
Write a program that inputs a list of integers (greater than or equal to 1)from the user, and creates an array of integers with no duplicates , In addition the program must output their minimum and maximum values.
The input is listed in red and the output is listed in blue, for your illustration. Your program input and output does not need to be in in either color.
Here is somesampleoutput:
Please enter some positive integers, hitting return after each one. Enter 'q' to quit: 2 3 2 2 2 2 q You entered 2 unique numbers: 2 3 The minimum value is: 2 The maximum value: 3 Please enter some positive integers, hitting return after each one. Enter 'q' to quit: 10 5 9 1 5 10 q You entered 4 unique numbers: 10 5 9 1 The minimum value is: 1 The maximum value: 10 Please enter some positive integers, hitting return after each one. Enter 'q' to quit: 100 You entered 0 unique numbers. The minimum value is: 100 The maximum value is: 100 Please enter some positive integers, hitting return after each one. Enter 'q' to quit: 55 22 22 75 42 68 q You entered 5 unique numbers: 55 22 75 42 68 The minimum value is: 22 The maximum value is: 75
Hints and Rules
- Your program should have at least 2 functions, including a main() function. Therefore a minimum of three functions total (includeing main). No global variables are allowed.
- At least one integer must be entered, your program should output the smallest (minimum) and largest (maximum) values in the array.
- When the program is finished, the program must have an array that stores each number only once (without duplicates), in the same order they were entered.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
