What is the "optimal" answer you are looking for if you ask to solve it without modulus? Build modulus by hand, or using additional resetting counter variables?
Re:FizzBuzz Enterprise Edition
by userbinator on Sunday December 21, 2014 @12:33PM
(#8780255)
Two counters, one that counts by 3 and one that counts by 5.
Aside: it astounds me how many people, when asked to write a short snippet of code during an interview, have basic formatting problems and inconsistent code style.
If this is being done on paper or an absolutely "non-IDE" text editor then it's probably someone dependent on an IDE to do the right formatting for them. If they still do this in an auto-formatting IDE, it's probably a sign that they have no good idea of the structure/flow of the code.