public class Q {
public static void main (String [] args) {
int[] arrayOflnts = {32,87,3,589,12,1076,2000,8,622,127};
int i,j,temp;
for (i = 0;i < 10;i++) {
for (j = 0;j < i;j++){
if (arrayOflnts[j] > arrayOflnts[j+1]) {
temp = arrayOflnts[j];
arrayOflnts[j] = arrayOflnts[j+1];
arrayOflnts[j+1] = temp;
}
}
System.out.println(arrayOflnts[j]);
}
}
}
//弄成这个样了 但还是不对 迷糊中...
public static void main (String [] args) {
int[] arrayOflnts = {32,87,3,589,12,1076,2000,8,622,127};
int i,j,temp;
for (i = 0;i < 10;i++) {
for (j = 0;j < i;j++){
if (arrayOflnts[j] > arrayOflnts[j+1]) {
temp = arrayOflnts[j];
arrayOflnts[j] = arrayOflnts[j+1];
arrayOflnts[j+1] = temp;
}
}
System.out.println(arrayOflnts[j]);
}
}
}
//弄成这个样了 但还是不对 迷糊中...
狂风扫落叶,扫把都失业!拍卖QQ:559372