A Scalene triangle has dissimilar sides: not two can be the same.

So if a == b or a == c or b == c it is not Scalene.

So if it isn't Equilateral or Isosceles it is Scalene - and you don't need to check at all.

All you need to do is find the biggest - which is trivial: if a > b and a > c it's a. Otherwise, if b > c it's b, otherwise it's c.

15,616,869 members