Why is this modulo equation wrong when it shouldn't?

前端 未结 0 1730
被撕碎了的回忆
被撕碎了的回忆 2020-12-29 04:21

Why isn\'t q equal to b as the formula for modulo is: a % b = a - (a/b)*b ?

x = (int(time.time())*100)
q = x % 360
b = x - (x/360)*360
print(x)
print(q)
print         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题