onlyOneIsTrue3 function

bool onlyOneIsTrue3(
  1. bool a,
  2. bool b,
  3. bool c
)

Implementation

bool onlyOneIsTrue3(bool a, bool b, bool c) {
  return ((a?1:0) + (b?1:0) + (c?1:0)) == 1;
}