views:

187

answers:

1

Hi Guys , Well i have a probleme with some puzzles , However i want to solve this puzzle and i need your help , i have an array from ten Numbers(Or More),for example :

arr[1,2,3,4,5,6,7,8,9,10]

i want a method to check if 3 numbers from this arrays have the same sum to another 3 numbers (I want to get all the possibilities ! ) , for example :

{1.8.10} {2.10.7} {3.7.9} {4.9.6} {5.6.8} {The sum Is : 19}

{1.6.10} {3.10.4} {5.4.8} {7.8.2} {9.2.6} {The Sum Is : 17}

{6.3.5} {7.5.2} {8.2.4} {9.4.1} {10.1.3} {The Sum IS :14}

Update:

That's another example to what exactly i want to do !

alt text

Or :

alt text

N.B : This is not a home work !

+2  A: 
Michael Dorgan
Can you give me all the project with an example please ?
No. That's not what this forum is about. We answer questions and add code where needed to show answers, but I'm not giving you an entire solution. I've given you 90% of what you need to solve your question. The rest is a little debugging and some trivial output. If you cannot do this yourself, then you have larger problems.
Michael Dorgan
Michael Dorgan :thanks ^^
i try to understand the code ^^
@the-ifl: Why are you asking for the entire answer to a Project Euler question? You won't get anything out of it if you just copy others' work... @Michael Dorgan: Be careful about providing even this much code for Project Euler questions! Spoilers are bad.
Jefromi
I didn't even know what that was until well after I had answered the question and it was a bit late to take down the answer :)
Michael Dorgan