Use a one-dimensional array to solve the following problem:
Write an application that inputs ten numbers, each between 10 and 100, both
inclusive. Save each number that was read in an array that was initialized to a value
of -1 for all elements. Assume a value of -1 indicates an array is empty. You are then
to process the array and remove duplicate elements from the array containing the
numbers you input. Display the contents of the array to demonstrate that the
duplicate input values were actually removed.
[Note: do not display the array
elements where the value is -1].
Comments
Leave a comment