Skip to main content
1 of 4
Paul R
  • 2.9k
  • 1
  • 18
  • 22

C: 8 tokens##

int max(int a, int b, int c)
{
    a += (b > a) * (b - a);
    a += (c > a) * (c - a);
    return a;
}

Inspired by @openorclose's answer, but converted to C and made branchless using multiplication rather than short circuit boolean operators.

Paul R
  • 2.9k
  • 1
  • 18
  • 22