Click here to Skip to main content
15,893,790 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a requirement where i have to find a list of combinations where the sum =180.
I have an array of intergers and have to pick up the elements from this array only.

For example :
Array = {30,45,60,15,60,30}
now i as an output should get - 60,60,30,30 or 45,15,60,30,30 or 45,15,60,60

I am trying various approaches but its failing in one or the other scenario.

Please provide inputs.

Thanks
Posted
Comments
Richard MacCutchan 11-Nov-13 6:53am    
Show some of the approaches you are using, and the errors you receive.
agent_kruger 11-Nov-13 6:54am    
do you just need multiple records that give the sum 180

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900