How can I use logic loop to print out 20 Pythagorean numbers of non-congruent triangles
<p>How can I use logic loop to print out 20 Pythagorean numbers of non-congruent triangles. 
Without repeating numbers i.e  if I have 4,3,5  I can't have 3,4,5.</p>

<p>I was using "for" loops but I don't know how to remove the repeating answers.</p>

<pre><code>for (k = 0; k &lt; 50; k++)
    {
        for ( i = 0; i &lt; 50; i++)
        {
            for ( j = 0; j &lt; 50; j++)
            {
                if ( (k+1)*(k+1) + (i+1)*(i+1) == (j+1)*(j+1) )
                {
                    System.out.println( "\n\n\t\tThe numbers are : " + (k+1) + ", "
                                                                     + (i+1) + ", "
                                                                     + (j+1) );
                }
            }
        }
    }
</code></pre>
