Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mathematics knundrum
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00780672
Message ID:
00780794
Vues:
29
Ok, I need to refresh my memory on this routines. Let us start with the pereb.prg (author Rustam Mukumov, most likely at rustam@sibron.ru).

There is an array paNumbers(tnArray) containing the list of numbers. In the original code this array is created in the code and populated with integers; length of the array is the first program parameter.

You need to pass your array to the program instead.

The second parameter is the target total, and the third parameter indicates whether you need to list all of the solutions or you want to know only how many solutions are there.

For example, you can run the original program like

=pereb(10,40,.t.)

to meet target total 40 for numbers from 1 to 10 in the list. You should see the list of 20 solutions.



>Thanks for the routines. I looked at the them and I'm wondering if you could tell me what each one does. The code is fairly straight forward but I'm not sure how to apply it to my situation. Thanks!
>
>>You may find two solutions here:
>>http://nsvisual.com/fox2/netr/pereb.zip, and
>>http://nsvisual.com/fox2/netr/komtask.zip
>>
>>They both have some limitations, but you can bypass them or anyway use the idea. Some comments there are in Russian, so let me know if you need to read comments.
>>
>>>I'm working on a reconciliation project and i'm stuck. I have a list of numbers lets say 100 numbers and I have a target amount that some permutation of these numbers adds up to. I don't know how many of them will add up to this number. I need the list of numbers that adds up to my target number. I tried writing this but my brain overworked itself. Anybody ever write something like this or have any ideas? Thanks in advance!!!
>>>
>>>Example
>>>Say my number is 362.21 and my number list is:
>>>201.10
>>>25.18
>>>150.11
>>>778.88
>>>151.21
>>>11.31
>>>10.00
>>>...
>>>The answer is 201.10 150.11 and 10.00
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform