Sort three variables: Difference between revisions
Content added Content deleted
m (combined three bullet items into one text paragraph with the same color background.) |
m (used a true bullet in the task's preamble.) |
||
Line 40: | Line 40: | ||
One algorithm could be: |
One algorithm could be: |
||
<big><big>•</big></big> store the three variables '''x''', '''y''', and '''z''' |
|||
into an array (or a list) '''A''' |
into an array (or a list) '''A''' |
||
|
|
||
<big><big>•</big></big> sort (the three elements of) the array '''A''' |
|||
|
|
||
<big><big>•</big></big> extract the three elements from the array and place them in the |
|||
variables '''x''', '''y''', and '''z''' in order of extraction |
variables '''x''', '''y''', and '''z''' in order of extraction |
||