Math, asked by dhanda1492, 1 year ago

How to calculate modulus of negative number?

Answers

Answered by srinivasvenkat
0
Modulus of any negative number will be positive number.
Answered by alishaagra99
0
Consider two numbers a and b,where a is negative and b is positive then a%b can be calculated simply as (a+b)%b . For example: a=-2 ,b=20 so, (-2+20)%20 gives (18)%20 which is 18. Take another example: a=-3 b=5 so, (-3+5)%5 gives us 2.
Similar questions