冒泡排序哪里出错了,求指教
int array[3];for (int i = 0; i <3; i++) {
printf("input %d number:",i +1);
scanf("%d",&array[i]);
}
for (int i = 0;i < 3-1 ; i ++) {
for (int j = 0; j < 3- i-1; j ++) {
if (array[j] <array[j+1]) {
int temp = array[j +1];
array [j +1] = array[j];
array[j] = temp;
}
printf("%d\n",array[j]);
}
}