Sort three variables: Difference between revisions

Content added Content deleted
m (C++ - simplified code)
m (combined three bullet items into one text paragraph with the same color background.)
Line 42: Line 42:
Θ store the three variables   '''x''', '''y''', and '''z'''
Θ store the three variables   '''x''', '''y''', and '''z'''
into an array (or a list)   '''A'''
into an array (or a list)   '''A'''
 

Θ sort (the three elements of) the array   '''A'''
Θ sort (the three elements of) the array   '''A'''
 

Θ extract the three elements from the array and place them in the
Θ 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