排序法1
`
#include[HTML_REMOVED]
using namespace std;
const int N = 10;
int LEN[N] = {1, 7, 3, 2, 9, 4, 10, 8, 6, 5};
int main(){
for(int i = 0; i < N; i){
for(int j = i; j < N; j){
if(LEN[i] > LEN[j]){
int t = LEN[i];
LEN[i] = LEN[j];
LEN[j] = t;
}
}
}
for(int i = 0; i < n; i++){
cout << LEN[i] << ” “;
}
return 0;
}
`