Well there are lots of sorting algorithms, the easiest being Bubble Sort, which is easy to implement in any programming language.
Checkout this thread for details of a few sorting algorithms http://www.go4expert.com/showthread.php?t=337
In case, you have some trouble, G4E help is just a post away.