title: Can someone explain please what does this do : n&1?
body: <p>Here is the code, I know what does it do , but I don't understand, what does the if condition do?</p>
  
  <pre><code>if(n&amp;1)
      {
          for(i=n/2,j=n/2+1;;i--,j++)
           if(__gcd(i,j)==1)
           {
              cout&lt;&lt;i&lt;&lt;" "&lt;&lt;j&lt;&lt;endl;
              break;
           }
      }
      else 
      {
          for(i=n/2-1,j=n/2+1;;i--,j++)
           if(__gcd(i,j)==1)
           {
              cout&lt;&lt;i&lt;&lt;" "&lt;&lt;j&lt;&lt;endl;
              break;
           }
      }
      return 0;
  }
  </code></pre>