# define MAX 100
Void SelectSort (int array [], int n);
Void main ()
{
An int array (MAX);
Int n, s, q;
Printf (" please input the number of sorts: \ n ");
The scanf (" % d ", & amp; n);
Printf (" please input to sort the data: \ n ");
For (s=0; S
Printf (" selection sort results for: \ n ");
For (s=0; S
}
Void SelectSort (int array [], int n)
{
Int k, q, s, temp;
For (s=0; S
K=s;/* * k element is used to record the minimum position/
For (q=s + 1; Q
K=q;
Temp=array [s].
Array [s]=array [k].
Array [k]=temp;
}
}