In c binary, testing to see if a number is in range
This is part of a puzzle that I can't figure out. The function takes in three inputs. The first is an int, the second is the lower bound and the third is the upper bound. I need to test to see if that first number is within the lower and upper bound inclusive. If it is in range then return 1, else return 0. The catch is that I can only use ! ~ & ^ | + << >> operations and only a combination of 20 of them.. Also, only int variables may be used, and no if statements, loops or function calls. Range(int x, int lower, int upper){ //... some code here return retVal; } Obviously I understand the