selection sort using c++

Started by
2 comments, last by DaAnde 17 years, 5 months ago
I am trying to program a very simple selection sort algorithm
Advertisement
Good luck.
If you're having problems, I suggest you give [a lot] more info; if you just wanted us to know, then yeah, good luck.
--------------------------It's called a changeover. The movie goes on, and nobody in the audience has any idea.
void Sort(int num[], int array_size)
{
int i, j;
int min, temp;

for (i = 0; i < array_size-1; i++)
{
min = i;
for (j = i+1; j < array_size; j++)
{
if (num[j] < num[min])
min = j;
}
temp = numb;
num = num[min];
num[min] = temp;
}
}

This topic is closed to new replies.

Advertisement