Since you don't specify a programming language I'll use pseudo-code. I'll use rand(0,10) to mean a random integer between 0 and 10.

integer num = 3480352;

integer random;

integer array[10];

integer max_rand;

integer num = 3480352;

integer random;

integer array[10];

integer max_rand;

```
for i from 1 to 9 //do this for the first 9 parts
max_rand = floor(num/30); //floor means round down, the 30 should be set to whatever you want
random = rand(0,max_rand*2) - max_rand; //This generates a number from -max_rand to max_rand
array[i] = num/(10-i+1) + random; //divide by 10 the first time, then by 9, then 8 etc
num = num - array[i]; Take it out of the old number
end for
array[10] = num; //put the rest in the last one
```