how do I make a bubble sort so it sorts the numbers in an array from smallest to highest ... my sorce code is below ... thanks for any help you can give me.

snofink

//assume the array is 5 numbers in size

for( int a=0; i<5; i++ )

{

for( i=0; i<5; i++ )

{

if( i > 0 )

{

if( set[a] < set[a-1] )

{

temp = set[a-1];

set[a-1] = set[a];

set[a] = temp;

}

}

}

}