Viswanathan.harsha wrote:
Thanks, i've been using abs(x) for so long that I forgot about the term Mod(x). I guess since the mod(x) must be a positive number, and x < 0, then to make the over value positive, it must be (-X) = X. Is this correct?
The definition of mod(x) is as follows:
y=|x|
y=x if x>0
y= -x if x<0
Hence in our question its given that x<0
=> ans is -x
Thanks and Regards,
Partha.