
-----------------------------------
Genisis
Wed Jan 11, 2006 11:06 am

I need help with a selection sort
-----------------------------------
i dont know how to selection sort (5 numbers lowest to highest,with one array)i know how it works but i dont know how to type in code will someone help me out

this is wat i got so far:


var num : array 1 .. 5 of int
var temp: int
for i : 1 .. 5
    get num (i)
end for
temp := num (1)

-----------------------------------
Tony
Wed Jan 11, 2006 11:30 am


-----------------------------------
[url=http://en.wikipedia.org/wiki/Selection_sort]Wikipedia has an example in C

-----------------------------------
CooKieLord
Mon Jan 23, 2006 5:52 pm


-----------------------------------


I'm sorry for posting on this "old" thread, but I need help with the sorting as well. I was reading through the example in C but I really don't understand.
Can you help me out here?

-----------------------------------
person
Mon Jan 23, 2006 6:34 pm


-----------------------------------
for example, u have 3 numbers that u want to sort and they are 

2
3
1

1) check if 1