write a function that finds the remainder between two numbers using only addition, sutraction and multiplication.
Anonym
This is pretty easy, guys. You don't want to be doing extraneous multiplication because it is veryyyy slowwwww. X and Y are the numbers to find the remainder of, assume X > Y. while(x > y) { x = x - y } return x Example: 10, 4 10 > 4 x = 10 - 4 = 6 6 > 4 x = 6 - 4 = 2 2 < 4 return 2