冒泡排序核心程序:
for(j=0; j<n-1; j++){ //假设n为数组容量 如a[10]
for(i=0; i<n-1-j; i++){
if(a[i]>a[i+1]){
temp = a[i];
a[i] = a[i+1];
a[i+1] = temp;
}
}
}
}