public static void main(String[] args) {
// 随机产生10个2位正整数 然后排序
Random rd = new Random();
int[] array = new int[10];
System.out.println(rd.nextInt(90) + 10);
for (int i = 0; i < 10; i++) {
array[i] = rd.nextInt(90) + 10;
System.out.println(rd.nextInt(90) + 10);
}
int temp = 0;
for (int i = 0; i < array.length - 1; i++) {
for (int j = 0; j < array.length - i - 1; j++) {
if (array[j] > array[j + 1]) {
temp = array[j + 1];
array[j + 1] = array[j];
array[j] = temp;
}
}
}
for (int i = 0; i < array.length; i++) {
System.out.print(array[i]+"\t");
}
}