摘要:
#include <stdio.h> int main() { int array[] = {3, 4, 2, 6, 3, 7, 3, 8, 5}; int i, j, temp, num; num = sizeof(array) / 4; /* BubbleSort */ for (i = 1; i < num; i++) { for (j = 0; j < num-i; j++) { if (array[j] > array[j+1]) { temp = array[j]; array[j] = array[j+1]; 阅读全文