/*c++定义函数void sort(int a[],int n),用选择法对数组a中的元素升序排列。

日期:2011-05-18 22:44:28 人气:1

/*c++定义函数void sort(int a[],int n),用选择法对数组a中的元素升序排列。

void sort(int a[ ],int n) { assert(a != NULL); for(int i = 0 ; i <n-1;i++) { for(int j = n-1 ; j>0 ; j--) { if(a[j-1]>a[j]) { int tmp; tmp = a[j]; a[j]=a[j-1
    A+
热门评论