title: How to test the return value from a function against multiple values without storing into a variable
body: <p>How could I achieve something like this ...</p>
  
  <pre><code>int main(void)
  {
    if (f(x) == (a || b))
    {
       puts("Success");
    }
    return (0);
  }
  </code></pre>
  
  <p>This would print Success if the return of f(x) is equal to a or b.
  I know it is possible to store it in a variable but my question is:
  "Could something like this be done by calling the f(x) function <strong>only once without using a variable</strong>?"</p>
  
  <p>Edit 1: I'm not allowed to use the switch statement for this assignment</p>
  
  <p>Edit 2: Could I set a range with only one expression like this?</p>
  
  <pre><code>if ( 2 &lt; f(x) &lt; 5)
  </code></pre>
  
  <p>Would this be valid (return type is int)?</p>