Selection Sort Method Which sort an array using selection sort..........
void SelectionSrt(int A[10])
{
int i,j;
int temp;
for(i=0; i<10; i++)
{
for(j=i; j<10; j++)
{
if(A[i]>A[j])
{
temp=A[i];
A[i]=A[j];
A[j]=temp;
}
}
}
No comments:
Post a Comment