+ 1
How come 7%(-3)=-2?
4 Réponses
+ 1
but i tried it in python2.7 and it give -2.
+ 1
according to stackexchange:
7/(-3)=-2.3333...
floor(-2.3333...)=-3
-3*-3=9
7-9=-2
0
i just tried it and it outputs 1
maybe you used / instead of %
0
if you saw that in a challenge I think it's an error. There are many error on challenges