How to find the remainder of dividing two numbers without using the modulo operator!!
My teacher gave me this exact exercise and It\'s only my 5th lecture in a course calle
you have a%b = a - (a/b)*b
but really a%b= a- (Math.floor(a/b)*b)
This is because without the math.floor it includes the decimal remainder and (a/b)*b is equal to a so when you subtract it from a you will get 0 every time, just as you experienced.