Answers for "sort 3 numbers in ascending order"

C#
0

order 3 integers in c#

if (a > c)
   swap(a, c);

if (a > b)
   swap(a, b);

//Now the smallest element is the 1st one. Just check the 2nd and 3rd

if (b > c)
   swap(b, c);
Posted by: Guest on October-31-2020

Code answers related to "sort 3 numbers in ascending order"

C# Answers by Framework

Browse Popular Code Answers by Language