Hey,
First off, I'm new to C programming and am having trouble with an assignment that involves sorting numbers that are input by the user. The requirements for the program must be:
-to read some positive numbers from the keyboard. use ": " for a prompt
-when the user types 0, the program stops reading numbers
-sort the numbers into ascending sequence, and print them one number per line
-sort the numbers into descending sequence, and print them one number per line
-print a line of 10 dashes before the first set of numbers, between the two sets of numbers and after the last set of numbers
-use a separate function to print the numbers
-use two separate functions to sort the numbers
-and it must handle an arbitrary number of numbers
Now, I've started and restarted writing this program several times, but have gotten nowhere. I am thinking that i will be using an insertion sort, but i'm having trouble figuring out how it will handle an arbitrary number of numbers. Thanks in advance for the help.