#include using namespace std; const int N=10;//想给几个数字排序就把N定义成几 void main() { int a[N],b; cout<<"请输入"<>a[b]; int a_min=0; int n=-1,i,j,temp; for(j=0;ja[i])//找到最小那个数,并且记住它的位置 { a_min=a[i]; n=i; } } if(n!=-1) { temp=a[j];//最小数与当前位置交换 a[j]=a[n]; a[n]=temp; } n=-1; } cout<<"排序后的结果为:"<