title: Pythagorean triples, not congruent
body: <pre><code>#include &lt;stdio.h&gt;
  
  void main ()
  {
  
    int a = 0, b = 0, c = 0, n;
    int counter = 0;
  
    printf("Please Enter a Positive Integer: \n");
    scanf("%d", &amp;n);
  
    for (c = 0; c &lt; n; c++)
    {
        for (b = 0; b &lt; c; b++)
        {
            for (a = 0; a &lt; b; a++)
            {
                if (a * a + b * b == c * c )
                {
                  printf("%d: \t%d %d %d\n", ++counter, a, b, c);
                }
            }
        }
    }
  
  }
  </code></pre>
  
  <p>This program calculates how many Pythagorean triples there are in a given integer n.</p>
  
  <p>This also included all triples that are congruent.</p>
  
  <p>I want to change the program so that it does not include the triples that are a combination of each other, I am lost as to how I would do this, any tips?</p>
  
  <p>For example when the integer <code>15</code> is inputted what will be printed is the following:</p>
  
  <pre><code>3, 4, 5
  
  6, 8, 10
  
  5, 12, 13
  </code></pre>
  
  <p><code>6, 8, 10</code> is a combination of <code>3, 4, 5</code> and I don't want this value to be printed. How would i change the program so that it does not print any combination of another Pythagorean triple? </p>