Have you dealt with sorting algorithms before? If not here's the basics of a bubblesort
http://www.cs.princeton.edu/~ah/alg_...ubbleSort.html . Basically the idea is that you compare each element to every other element, until they're in order.
You've got the input loop done already, so you just need to write the sort function, and then make two ouput loops, one to print the numbers in acending order (by printing the sorted array in the forward direction) and one to print the array backwards, therefore giving you the descending order.