Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mathematics knundrum
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00780672
Message ID:
00780832
Views:
16
Bruce,

If all of the numbers are positive (which may or may not be a good assumption), you (that's a rhetorical you <g>) could design it to short circuit and move on as soon as any combination of numbers exceeds the target...
>
>Which is a total of 10 + 45 + 120 + 210 + 252 + 210 + 120 + 45 + 10 + 1 = 1,033 different possible sums that must all be checked, unless a "hit" is found and the loop can end sooner.
>
>(If my math is correct, usually I let a program do the factorial & summing work :-)
>
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform