***排序***
int array[10] = {10, 9, 7, 6, 4, 8, 5, 3, 1, 2};
int count = 10;
int flag = 0;
for (int i = 0; i < count - 1 && flag == 0; i++) {
flag = 1;
for (int j = 0; j < count - i - 1; j++) {
if (array[j] > array[j + 1]) {
int temp = array[j];
array[j] = array[j + 1];
array[j + 1] = temp;
flag = 0;
}
}
}
for (int i = 0; i < count; i++) {
printf("%d\n", array[i]);
}