NyQuil
2013-06-08 08:47:43 UTC
For example: User was asked how many numbers he wants to enter, user enters 5. User then enters the 5 numbers: 1 1 2 3 4.
The output should be: 1
If user enters 1 1 2 2 4
the output should be: 1 2
and if the user enters: 1 2 3 4 5
the output should be: 1 2 3 4 5
I tried finding the mode for hours, I've come closer, but the last number won't show up. Like if I enter 1 2 3 4 5, the output only shows 1 2 3 4. Other codes I've look for wont print the mode if 2 numbers have occur the same number of times. Please help!
Thanks a million!