My code output repeats
<p>I'm doing this code for triangle finding perameters for right triangles
but the output seems to come out right but repeated </p>

<pre><code>#include&lt;iostream&gt;
#include&lt;vector&gt;
#include&lt;list&gt;
#include &lt;math.h&gt;
#include &lt;algorithm&gt;


using namespace std;

int main()
{
    int a;
    float c;
    vector&lt;double&gt; retval;
    double intiger;
    double p;
    double l = 25;
    float array[3];

    for (int b=1; b &lt; l; b++) {
        for (int a=1; a &lt; l; a++) {
            intiger = sqrt((b*b)+(a*a));
            c = sqrt((b*b)+(a*a));
            if (c == intiger) {
                array[0]=a;
                array[1]=b;
                array[2]=c;
                //int elements = sizeof(array);
                //cout &lt;&lt; elements &lt;&lt; endl;
                sort(array, array +3);
                //retval.push_back(a);
                //retval.push_back(b);
                //retval.push_back(c);
                if (c == a ) {
                    continue;
                }
                p = a + b + c;
                if (p &gt; l) {
                    break;
                }
                //cout &lt;&lt; "p == " &lt;&lt; p &lt;&lt; endl;
            } else {
                continue;
            }

            //if (retval.size()== 62)
            //cout &lt;&lt; c &lt;&lt;endl;
            //cout &lt;&lt; " a = " &lt;&lt; a &lt;&lt; " b = " &lt;&lt; b &lt;&lt; " c = " &lt;&lt; c &lt;&lt; " "
            cout &lt;&lt; array[0] &lt;&lt; " " &lt;&lt; array[1] &lt;&lt; " " &lt;&lt; array[2] &lt;&lt; endl;
        }
    }

    return 0;
}
</code></pre>

<p>The output comes out to be repeated twice.</p>

<pre><code>3 4 5

3 4 5

6 8 10

6 8 10
</code></pre>

<p>I want to make it repeat only once.</p>
