美文网首页
冒泡排序

冒泡排序

作者: lewisX | 来源:发表于2016-03-26 19:24 被阅读0次

程序:

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);

相关文章

网友评论

      本文标题:冒泡排序

      本文链接:https://www.haomeiwen.com/subject/xmbdlttx.html