3 ms·
I like the idea of a T-shirt with a FizzBuzz solution on it. That said, the code on this shirt isn't actually a correct solution to FizzBuzz. Even ignoring th
by smarx 14y ago
I like the idea of a T-shirt with a FizzBuzz solution on it.
That said, the code on this shirt isn't actually a correct solution to FizzBuzz.
Even ignoring the extra lines of output ("##is divisible by X," with a missing space), on numbers like 15, this program prints "fizz" and then "buzz" and then "FizzBuzz" (instead of just "FizzBuzz.")
Unless there's some intentional irony I'm missing, I would suggest fixing the code.
- orangethirty 14y agoIt is intentional. The t-shirt is meant to be funny.