- Joined
- Oct 13, 2014
- Messages
- 2,512
- Reaction score
- 1,245
Code:
typedef unsigned int u32;
const u32 n = 10;
u32 a[] = {10, 9, 8, 7, 6, 5, 4, 3, 2 ,1};
for (u32 i = 0; i < n; i++) {
u32 min = i;
for(u32 j = i; j < n; j++)
if (a[j] < a[min]) min = j;
u32 temp = a;
a = a[min];
a[min] = a;
}
That's sums up what I think, more or less.