Wanted to find out what happens the numerator is smaller than the denominator for instance 4%8? | Sololearn: Learn to code for FREE!
0

# Wanted to find out what happens the numerator is smaller than the denominator for instance 4%8?

Modulus operator

22nd Jan 2019, 11:11 PM
TUMAINI BENJAMIN EMMANUEL
4 Answers
+ 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
22nd Jan 2019, 11:34 PM
Denise RoĂberg
+ 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.
23rd Jan 2019, 1:25 AM
Zeke Williams
+ 1
Awesome thanks for the explanation guys!!
23rd Jan 2019, 4:27 AM
TUMAINI BENJAMIN EMMANUEL
+ 1
ÙÙ ÙÙÛŰŻÙÙÙ đ
23rd Jan 2019, 9:38 PM
Ruby