Math, asked by TonyAman8655, 1 year ago

Division between two integers should truncate toward zero.

Answers

Answered by aagnavaagna
0

Do floating point division then convert to an int. No extra modules needed.

>>> int(float(-1)/2) 0 >>> int(float(-3)/2) -1 >>> int(float(1)/2) 0 >>> int(float(3)/2)
Similar questions