Thread: Array help
View Single Post
Old 10-26-2005, 08:29 AM   #4 (permalink)
teknomage1
Jack of all trades
 
teknomage1's Avatar
 
Join Date: Feb 2005
Location: Los Angeles
Posts: 598
teknomage1 is on a distinguished road
Send a message via AIM to teknomage1
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.
__________________
Stop intellectual property from infringing on me
teknomage1 is offline   Reply With Quote