error: size of array 'momentumOfparticles' has non-integral type 'float [i]'

I believe this is the problem.

float MassOfparticle[i] = {1,2,3,4,5,6,7,8,9,10};
float MomentumOfParticles[MassOfparticle];

Although it is not apparent, MassOfparticle, when used as an expression in the second statement is interpreted as a *pointer * to the address of the first array element, which is a float. An array dimension must resolve to a positive integer and floats don't do this without massaging.

Possibly what you wanted was:

float MomentumOfParticles[sizeof (MassOfparticle) *  sizeof (float)/ sizeof (float)];

This would result in MomentumOfParticles having
(10 x 4 ) / 4 elements. Or, ten elements.

Check out the last paragraph