#include void selectionSort(int *array,int length)//selection sort function { int i,j,min,minat; for(i=0;i<(length-1);i++) { minat=i; min=array[i]; for(j=i+1;j<(length);j++) //select the min of the rest of array { if(min>array[j]) //ascending order for descending reverse { minat=j; //the position of the min element min=array[j]; } } int temp=array[i] ; array[i]=array[minat]; //swap array[minat]=temp; } } void printElements(int *array,int length) //print array elements { int i=0; for(i=0;i<10;i++) cout<