0
Wanted to find out what happens the numerator is smaller than the denominator for instance 4%8?
Modulus operator
4 Antworten
+ 4
You can use the code playground. The result will always the same as the numerator.
4%8 = 4
1%7 = 1
https://stackoverflow.com/questions/3622298/how-does-modulus-of-a-smaller-dividend-and-larger-divisor-work
+ 3
I like to think of it like this:
Q: What is the remainder of a smaller number divided by the larger number?
A: It goes in zero times, with the smaller number left over.
In other words, the smaller number will always be the remainder in a modulo division, like Denise Roßberg said.
+ 1
Awesome thanks for the explanation guys!!
+ 1
من نمیدونم 😕