* 数组从大到小排序
*/
int a[] = {3,5,7,2,4,7,2,1};
paixu(a);
dayin(a);
}
//打印从大到小的数组数据
for (int i = 1; i < temp.length; i++) {
System.out.print(temp[i]+"\t");
}
}
//System.out.print("\n数组从小到大排序");
for (int i = 1; i < temp.length; i++) {
for (int j = 0; j < temp.length; j++) {
if (temp[i]<temp[j]) {
int x = temp[i];
temp[i]=temp[j];
temp[j] = x;
}
}
}
}
}