Sort three variables: Difference between revisions
→{{header|Mathematica}}
(Added Fōrmulæ solution) |
|||
Line 1,771:
77444</pre>
=={{header|Mathematica}}/{{header|Wolfram Language}}==
All variables in Mathematica are typeless so the follow code works in all cases
<lang Mathematica>{x, y, z} = Sort[{x, y, z}]</lang>
example:
<lang Mathematica>x = 77444;
y = -12;
z = 0;
{x, y, z} = Sort[{x, y, z}];
{x, y, z}</lang>
{{out}}
<pre>{-12, 0, 77444}</pre>
=={{header|min}}==
|