#include <iostream> using namespace std; void select_Sort(int *p,int n){ int i,j,k,t; for(i=0;i<n-1;i++){ k=i; for(j=i+1;j<n;j++){ if(*(p+j)<*(p+k)) k=j; t=*(p+k); *(p+k)=*(p+j); *(p+j)=t; } } } int main(){ int a[10],i; cout<<"enter the original array:"<<endl; for(i=0;i<10;i++){ cin>>a[i]; } cout<<endl; select_Sort(a,10); cout<<"the sorted array:"<<endl; for(i=0;i<10;i++){ cout<<a[i]<<" "; } cout<<endl; return 0; }