Question

Write a function to find the remainder when a is divided by b without using % operator?

Login to Submit

Examples

Input: 10 4
Output: 2
Reason: When 10 is divided by 4 the remainder is 2


Note: You shouldn't use % operator.