+ 2
Challenge šÆ š š š write a code to arrange 10 given numbers š¢ in descending order.
š¢
3 Answers
+ 2
My realization is:
int[] input = new int[10];
for (int i = 0; i<input.length; i++){
input[i] = new Scanner(System.in).nextInt();
}
Arrays.sort(input);
for (int i = input.length; i>0;){
System.out.println(input[--i]);
}
+ 1
Here's one I made.
https://code.sololearn.com/cS6k7rqH6n3i/?ref=app
0
https://code.sololearn.com/cPwBXfIYQP5d/?ref=app
This is an implementation of Selection sort.