Getting there... Help still needed

I understand the problem, and I understand I somehow have to implement 3 nested for loops (3 that's right, right?) to test all the possibilities...

I am not sure what are ther ranges I have to input into the 3 nested for loops though. Can anyone help me out with this?

Greatly appreciated if you can :)

Causes Unwanted Repetition :(

I can see where you are getting the idea from but just so that I can try to explain things easier... we will say the range is 1-3 only, for simplicity sake.

OK, u have the following loops above...

(a=1; a<3; a++){

(b=1; b<3; b++){

(c=1; c<3; c++){

}

}

}

Working this out on pen and paper I found I got unwated repetition occuring, let me explain...

When A=1 (a=1 is < 3), so the 2nd loop will be excuted,

B=1 (b=1 < 3), so the third loop will be excuted.

C=1 (c=1 < 3) The third loop will continue to repeat itself until C=5 (c=3 is !< 3) that is when it stops.

Right now we have...

A = 1

B = 1

C = 1, C = 2

After the 3rd loop has stopped it will go back to the 2nd loop,

B=2 (b=2 < 3) the condition is true, so the 3rd loop is excuted until C=3 (c=3 !< 3) that is when it stops.

Right now we have...

A = 1

B = 2

C = 1, C = 2

-------------------------FIRST FULLY COMPLETED LOOP-----------------

When A=2 (a=2 is < 3), so the 2nd loop will be excuted,

B=1 (b=1 < 3), so the third loop will be excuted.

C=1 (c=1 < 3) The third loop will continue to repeat itself until C=5 (c=3 is !< 3) that is when it stops.

After this it will go back to the 2nd loop,

B=2 (b=2 < 3) the condition is true, so the 3rd loop is excuted until C=3 (c=3 !< 3) that is when it stops.

Basically this is all the possibilities you will get....

A B C(Hypothenous)

1 1 1

1 1 2

1 2 1

1 2 2

2 1 1

2 1 2

2 2 1

2 2 2

The problem is that there is repetition happening,

FOR EXAMPLE: 1 2 1 (isn't this the same is as)

2 1 1 (The only difference here is sides a and b

has been swapped around)

I don't want this to happen! PLEASEEEEEEEE HELP!!!

PLEASEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE!!!

Thank-You