Hi,

I need a program that can calculate all probable calculations for a desired sum from an exact scheme …

There will be 5 columns and 6 rows … for each calculation, only one number is chosen from each row, as you can see in the example below … this program should calculate all probable calculations for a desired sum and also DISPLAY them as below …

Also, numbers and sum number should be designated by the user…

For example …

20 20 20 20 20
24 25 26 27 28
21 21 21 21 21
23 24 25 26 27
22 23 24 25 26
22 22 22 22 22
should be = 140

20 -- -- -- -- *
-- -- -- -- 28
21 -- -- -- -- *
-- -- -- -- 27
22 -- -- -- --
22 -- -- -- --*
=140

OR

20 -- -- -- --*
-- -- -- 27 –
21 -- -- -- --*
-- -- -- -- 27
-- 23 -- -- --
22 -- -- -- --*
=140

SO FORTH ...

There might be other calculations that gives the desired sum, but two examples are enough for making the content clear, I think .

*These columns just have one number, in all calculations just one number is being used, so just one is written also .

It should be done with permutations or combinations, i guess ...

Whatever, for the last, if anyone wants to know, I need this code for video editing and music synchronization .

Thanks for attention and regards …