Hacker News new | ask | show | jobs
by daemin 752 days ago
Unless you specifically want a compiling and running version of FizzBuzz you don't actually need to use or know about the mod operator.

At least for me it would be sufficient if the person used a function like IsMultipleOf(x, m), or Remainder(x, n). This would at least make it clear what the function did even if they didn't get the exact operator.

The other thing to note is that the mod operator works differently on different languages and platforms.

1 comments

> the mod operator works differently on different languages and platforms

Not with positive inputs, which is the domain of FizzBuzz.

Even if you don't know what "mod" means, if you have no idea know what a remainder is, and that the problem calls for it, and you can't derive the mod operator using integer addition, subtraction, multiplication, and division, then your math and problem solving skills are pretty weak, which FizzBuzz tests.