1

In java: -2 % 6 = -2

In python -2 % 6 = 4

Why this happens. could you please explain it?

F. Müller
  • 3,969
  • 8
  • 38
  • 49
Kumaresan Perumal
  • 1,926
  • 2
  • 29
  • 35
  • [Best way to make Java's modulus behave like it should with negative numbers?](https://stackoverflow.com/q/4412179/12323248) – akuzminykh Nov 04 '20 at 06:47

0 Answers0