+ 4
in such cases, the answer is the smaller number itself.
Because larger number times 0 can only be less than the smaller number, remainder is the smaller number itself
+ 2
@Srinivasa
3/6 = 0.5
then the remainder is 0, but:
3//6 = 0
3%6 = 3
Modulus operator is based on floor division (the second one).
- 1
Try to divide 3 / 6. What is the quotient and what is the remainder? The answer to your question is the remainder, as "%" is the operator for the remainder operation.