PDA

View Full Version : Solved: Possible Combination with same Total



botyok
10-14-2008, 09:21 PM
Hello,


Need help in coding this problem in microsoft access.

I have a table with values 1,2,6,7,9,11,15. These values are taken from between 1 to 50, no the same value on the table.

What i would like to implement is from a given total, the code pick 4 numbers and give the possible combination with the same total of the given total. No number should be picked repeatedly in the 4 numbers. No repeat of combinations ex. 6,9,11,7 = 33 11,9,6,7 = 33

ex.

value of given total = 33

possible combinations (numbers in any position): No number should be picked repeatedly in the 4 numbers. No repeat of combinations ex. 6,9,11,7 = 33 11,9,6,7 = 33 7,9,11,6 = 33 6,11,7,9 = 33

correct way is:

6,9,11,7 = 33
1,6,11,15 = 33
and so on...

Any help is highly appreciated.


botyok

Oorang
10-15-2008, 12:13 AM
Hi Botyok,
Welcome to the board:) What is the application of this, is it homework?

botyok
10-15-2008, 02:23 AM
yes its a homework..

please help

Oorang
10-15-2008, 03:16 AM
Hi Botyok,
As a general principle we won't do homework for you on this site. The primary reason being that this site is to assist people in learning to code for themselves. If we do the homework for you then you are robbed of what you should have learned (and presumably paid good money for).
Which is not to say you can't get help with homework, it's just to say we won't just do the problem for you. If you get stuck, post your work and ask for help with the specific stopping point you are stuck at, and someone will probably be happy to point you in the right direction so you can continue solving the problem on your own.

botyok
10-15-2008, 04:42 AM
Anyways I understand.. Got help from a friend of mine...

Thanks!