Sorting three numbers

  • 8
  • Locked
Planet Linear Chaos is populated by isomorphs. They are believed to have invented sorting algorithms. Everything in their heads is extremely well-ordered. They only issue planetary visas to people who know at least 7 sorting algorithms. Let's take our first step toward Linear Chaos: read three numbers from the keyboard, put them in descending order, and then display them on the screen.
You can't complete this task, because you're not signed in.
  • Popular
  • New
  • Old
You must be signed in to leave a comment
DyritsLevel 7 , Die
3 July, 07:37
Can't we simply use Math.min() and Math.max() and deduce them from the sum for the middle value ?
EdddiegLevel 9 , Providence
10 June, 05:31
I don't like to brag ... but I got this on the first try doing something good ... tbh I feel like its best to work on a regular IDE before transferring your code here
PrasshaLevel 24 , Chagford
29 April, 14:53
Can any one advise me, what is wrong with the code. I am seeing this message: If you enter the numbers 2, 1, 2, then the program should display: 2 2 1
PrasshaLevel 24 , Chagford
29 April, 15:28
Hi, i figure it out. Mistake was my code was printing the answer twice. Thank you.
4 April, 12:45
Tip for everyone here. Your code will fail i you display ANYTHING other than the numbers in descending order. I made the mistake o displaying the unsorted numbers first. ONLY display the SORTED list.
shubham sharmaLevel 5 , Delhi
1 February, 06:11
what's wrong
10 January, 23:51
Arrays and 'for' loops will GREATLY simplify this process, if you know how to use them.
Sam Level 12 , ELIZABETH
9 November 2019, 14:01
Even though my code works, can anyone give me a hint on how to make this code efficient. thanks!
21 October 2019, 08:34
what is wrong with my code
RomanLevel 41
22 October 2019, 04:19
If you need help, something isn't right in your code, the server won't accept your solution (even if you are 100% sure that it is correct). Describe your question/issue in the HELP section at
28 September 2019, 07:05
Whats wrong with my code its displaying descending order but last condition isn't satisfied why?
Syed HuzaifaLevel 7 , Karachi
2 May, 21:45
same goes with me
Adrian FinneyLevel 9 , Landover
26 September 2019, 17:32
Clarifying: (1st Digit) 3 "AND" comparison combinations, (2nd Digit) 6 "AND" comparison combinations, (3rd Digit) 6 "AND" comparison combinations