Recreate modulo [cancelled]
+0
−0
Recreate the modulo operation via function or program.
Mechanics:
- The modulo operator involves division and returns the remainder.
- For a function, use 2 variables as
foo(a,b)
such that $x \mod y$. - For a program, take 2 variables as input where
a b
is $x \mod y$. - Use standard division and return the remainder without using a built-in modulo operator.
Rules:
- Standard loopholes are forbidden.
- Shortest code in bytes wins.
1 comment thread