Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



It is intentional. The t-shirt is meant to be funny.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: