Why do people say "doing fizzbuzz" rather than just programming? Fizzbuzz is just a trick question to see if new programmers know how to use the modulo operator or not.
I have been to student recruitment events at universities hiring software engineers for quite advanced level jobs. We give out a programming quiz (with a nice prize) at these events and we include the fizzbuzz puzzle. We allow solutions in any language and give out style points for nice solutions.
Our experience is that the answers to fizzbuzz are a good classification criteria in vetting who has got programming abilities and who has not. Most people who actually try can solve it, but the ones who are talented give out either a perfect and simple solution or do something elegant and go for the style points. The ones who don't give out a fumbling solution that is too long or shows signs of not being comfortable with the task at hand, even if they manage to write a computer program that produces the correct results.
As silly as it may sound, the fizzbuzz test is a good classifier for programmers. I didn't believe it until I saw the evidence from the quality of candidates we got.
Knowing how to fizzbuzz doesn't make you a good programmer.
But not being able to do it is a very strong signal that someone can't program in any professional setting, no matter what they pretend. It's a very simple and effective test to rule out people who think/pretend they can program, but really can't.
Maybe this is a stupid question, but wouldn't that always return true? (a/b)*b just cancels out the b right? Unless there is weird floating point stuff going on.
Or even if you don't know anything about integer math, you can use repeated subtraction. Or ask for help on finding a multiple and do the rest of the structure yourself. Or keep a counter to 3 and a counter to 5 and reset them when they fill up.
Definitely not a gimmick question about whether you know about modulus.
Fizzbuzz is a test for programming-ability. It's easy to explain, easy to grade, easy to run. If you wanna check if someone can programme, then someone else has already come up with a good test (fizzbuzz) to give them.