for (int i = 0; i < ns.length; i++) {
for (int j = ns.length - 1; j > i; j--) {
if (ns[j] > ns[j - 1]) {
int temp = ns[j - 1];
ns[j - 1] = ns[j];
ns[j] = temp;
}
Sign in to make a reply
THONY_安
for (int i = 0; i < ns.length; i++) {
for (int j = ns.length - 1; j > i; j--) {
if (ns[j] > ns[j - 1]) {
int temp = ns[j - 1];
ns[j - 1] = ns[j];
ns[j] = temp;
}
}
}