how can I print some numbers in ascending order?
63 views (last 30 days)
Kaustav Bhattacharya on 2 Jul 2019
You have a, b, c. If you can use >,< then the following implemention can be used.
max = (a>b)*a + (a<b)*b
max = (max>c)*max + (max<c)*c
min = (a>b)*b + (a<b)*a
min = (min>c)*c + (min<c)*min
mid = (max~=a & min~=a)*a + (max~=b & min~=b)*b + (max~=c & min~=c)*c