程序:
void bubbleSort( float array[], u32 length )
{? ? u32 i =0, j = 0;? ? float temp = 0;? ? for (? j=0;jarray[i+1] )
{
temp = array[i];
array[i] = array[i+1];
array[i+1] = temp;
}
}
}
}
使用:
float buf[length]
bubbleSort(buf, length);
程序:
void bubbleSort( float array[], u32 length )
{? ? u32 i =0, j = 0;? ? float temp = 0;? ? for (? j=0;jarray[i+1] )
{
temp = array[i];
array[i] = array[i+1];
array[i+1] = temp;
}
}
}
}
使用:
float buf[length]
bubbleSort(buf, length);