title: How to generate random values with fixed sum in C++
body: <p>I want to generate 3 random numbers in the range <code>0 to 9</code> in a row which should sum up to a given fixed number. For example, for the given fixed sum  15, one possible solution would be <code>(3, 8, 4)</code>. How can I do this ? Thanks.</p>