Friday, February 21, 2014

Better FizzBuzz

I was playing with PowerShell today - and writing another FizzBuzz.  I came across an example where the least common multiple of 3 and 5 (15) was used as a way to reduce the number of checks needed per pass.  Very cool!  Here's my powershell FizzBuzz using that.

No comments:

Post a Comment