The dumbest programming challenge
Please write a program that prints the numbers from 1 to 100, but for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers that are multiples of both three and five print "FizzBuzz".
You can do clever things with FizzBuzz. You can write it recursively, or use a stack. You can do better math, remembering that the LCM of three and five is fifteen. But here's the thing about FizzBuzz. Programmers get nervous in interviews and they forget the basics. They don't forget math, or the syntax of a for
loop. I mean they forget how to deconstruct a programming problem. FizzBuzz has just enough crap in it that trying to write it in one step is foolish. Break the program down into its discrete functions.