Any ideas on how to do this?
Write a program that allows the user to enter
a set of positive integers in order from smallest to largest and then
the program will output the median of the set of numbers. The user
will type a -5 to indicate that the list of integers is complete. (The -5
is not part of the list).
If the user doesn't enter the numbers in order, the program should
display "Numbers entered out of order. Exiting." and exit. You can exit the
program using the command: exit(1)
Write this program using vectors.
My problem is that I can't seem to figure out in my head how to run a loop for this.