how can i make a calculation to say the sum of certain 4 numbers to give a certain result like 280. all possible combinations of numbers from 1 to 80. display all the combinations of 4 numbers that have the sum I set in the textbox. I should find out the easiest way to do this, and I would be grateful if you could help me. there should be no repetitions in a instance, like 60 60, 80 80. thus eliminating the unimportant variants, and the important ones will remain.
Textbox1.Text
68,69,70,72 = 280
67,69,70,74 = 280
66,69,70,75 = 280
65,69,70,76 = 280
64,69,70,77 = 280
and so on...
I would need a model, how could I conceive such an algorithm? Thank you very much.
Get all combinations which declares a sum from a certain number