title: Is it possible to find out which number is bigger without using an if statement?
body: <p>I'm doing some small program for a beginners programming course and in my program I have 2 variables which hold numbers. Anyway I need to find out which number is bigger and print the appropriate message according to it, for example I have:</p>
  
  <pre><code>int x = 5;
  int y = 10;
  </code></pre>
  
  <p>I need to print:</p>
  
  <p>"it is true that y is bigger than x";</p>
  
  <p>Now the thing is that I know I can use a simple if statement but I'm not allowed to use it, now it makes me wonder, is it even possible? If so, how can I do that? How can I check which number is bigger WITHOUT doing something like:</p>
  
  <pre><code>if (x &gt; y) 
      answer = true;
  </code></pre>
  
  <p>...</p>
  
  <p>Thanks in advance.</p>