- 1

# Can anybody explain

How 2%7 is 2

4 Answers

+ 1

Because you can replace the multiple withany (pos) integer.
For example: day start at 12:00 at midnight.
Time: 10:00 o’clock AM . (10 day zero)
Tomorrow same time (10 + 24) = 34
Day after that 10 + 48 = 58
After that 10 + 72 = 82
So to explain what the time is
10, 34, 58 and 82 hour after that midnight:
10 % 24 (day 0)
34 % 24 (day 1)
58 % 24 (day 2)
82 % 24 (day 3)
All became 10 (10:00 AM)
10 + day * 24 = hour (formula)
hour % 24 = 10 (modulo)

+ 2

Thanks a lot

+ 1

Because 2 is the rest.
2 % 7 = 2 because 2 + 7 * 0 = 2
9 % 7 = 2 because 2 + 7 * 1 = 9
16 % 7 = 2 becuase 2 + 7 * 2 = 16
etc

0

Why 7*0