Challenge šŸŽÆ šŸ”” šŸ”” šŸ”” write a code to arrange 10 given numbers šŸ”¢ in descending order. | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

Challenge šŸŽÆ šŸ”” šŸ”” šŸ”” write a code to arrange 10 given numbers šŸ”¢ in descending order.

šŸ”¢

12th Oct 2017, 10:33 AM
Maneesh Kumar Singh
Maneesh Kumar Singh - avatar
3 Respostas
+ 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]); }
12th Oct 2017, 11:31 AM
Alexey Zlo
Alexey Zlo - avatar
12th Oct 2017, 1:00 PM
Keegan Robertson
Keegan Robertson - avatar
0
https://code.sololearn.com/cPwBXfIYQP5d/?ref=app This is an implementation of Selection sort.
12th Oct 2017, 1:44 PM
AlphaCoder
AlphaCoder - avatar