1

In java: -2 % 6 = -2

In python -2 % 6 = 4

Why this happens. could you please explain it?

F. Müller
  • 3,151
  • 6
  • 34
  • 43
Kumaresan Perumal
  • 1,805
  • 25
  • 34
  • [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