Subtraction of a number

I have a number $x$. If I remove the last digit, I get $y$. Given $x-y$, how can I find $x$?

For example x=34 then y=3 given 34-3=31, I have to find 34.
if x=4298 then y=429 , given 4298-429 = 3869 . how can I find 4298 from given 3869?


Removing the last digit is a division by $10$ (and the last digit is lost).

So $x-y=x-\dfrac x{10}\approx\dfrac{9x}{10}$, and reciprocally $x\approx\dfrac{10(x-y)}9$.


For safety, check the solution after truncating.

Source : Link , Question Author : Shakhawat Hossain , Answer Author : Community

Leave a Comment