Possible Duplicate:
Choosing n numbers with fixed sum
I m developing a Bot for my Bux system in PHP. the Bot should run N
times in a day and each time create variable (random) K
users in a manner that sum of users in the day be fixed (M
).
How can I achieve this? (Choosing Random number N
times that sum of numbers be M
).