Question from the C++ test

C++ code to check if a number is between 0 and N