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

It’s still an extra condition. So it really doesn’t matter if you’re printing “Fizz Buzz” string or not, it’s the same amount of branching.


add another bool that stores the information to write a newline whenever either fizz or buzz happen and you don't need the third branch




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

Search: