for(i=0;
i<size; i++)
{
for(j=i+1; j<size; j++)
{
if(a[i] > a[j])
{
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
}
printf("Array after sorting is: ");
for(i=0;
i<size; i++)
printf(" %d",a[i]);
getch();
}
0 comments:
Post a Comment