0
$\begingroup$

I'm really embarrassed to ask this - my apologies.

In a piece of software I'm writing, I am using the following:

$Y = X+\frac{X}{10}N$

That's all fine - but how do I calculate X when I know Y and N?

I know it's really basic, but for some reason I get stuck half-way through moving the equation around.

  • 0
    Are X,Y,N suppose to be integer types? Or are they floats? I am asking this because X/10 might become 0, when 1 <= X <= 10, when X is an integer, depending on your programming language. So the mathematical formula might actually not work!2010-11-23

1 Answers 1

1

If $Y=X+\frac{X}{10}N=X\left(1+\frac{N}{10}\right)$, then $X=\frac{Y}{1+\frac{N}{10}}$ .