Answers for "order 3 integers in c#"

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

C# Answers by Framework

Browse Popular Code Answers by Language