Here is an example of what I want to display:
Numbers 10, 25, 3, 4,6, 30. 5, 7,1 are entered.
The program will display:
10 and 25
30 and 5
and the map: 10,25,3,4,6,30,5,7,1
I can get this result if I initialized the array.
But I cannot make it work with the scanner so I can enter different numbers every I run the program.