| ¹öºíÁ¤·Ä °³³ä | ¹öºíÁ¤·Ä ¾Ë°í¸®Áò | ¹öºíÁ¤·Ä ºÐ¼® |
¹öºí Á¤·Ä ¾Ë°í¸®Áò
--------------------------------
void bubblesort(int A[], int n)
{ int i, j, temp;
for (i = n-1; i > 0 ; i--)
{
for (j = 1; j < = i ; j++)
if (A[j-1] > A[j])
{ temp = A[j-1];
A[j-1] = A[j];
A[j] = temp; }
}