title: Ignore i And j’s same value in loop
body: <p><strong>I want to print feasible solutions by adding up the maximum combinations of 2 indexes for n indexes where no index’s value can be added to itself</strong></p>
  
  <blockquote>
    <p>Expected output for 4 indexes 1,2 1,3 1,4 2,1 2,3 2,4 3,1 3,2 3,4 4,1
    4,2 4,3</p>
  </blockquote>
  
  <p><em>Where I’m going wrong :: (Here’s my Code )</em></p>
  
  <pre><code>for(i=1;i&lt;n;i++)
  {
      for(j=1; j!=i &amp;&amp; j&lt;n; j++)
      {
          printf("%d,%d",i,j);
      }
  }
  </code></pre>