TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What's the shortest FizzBuzz you can write? What language?

8 pointsby jontsaiover 13 years ago

2 comments

jontsaiover 13 years ago
I first heard about FizzBuzz from Hackruiter.com and then I got an email from RapLeaf (<a href="http://blog.rapleaf.com/dev/2011/09/06/code-golfing-at-the-office" rel="nofollow">http://blog.rapleaf.com/dev/2011/09/06/code-golfing-at-the-o...</a>)<p>It's a very interesting concept to filter out the bad programmers using something simple like FizzBuzz. What do you guys like to give out as programming or interview questions? How effective are they?
评论 #2981682 未加载
rorrrover 13 years ago
the shortest I could do is 72 characters in PHP. I have no idea how they can do 56.<p><pre><code> &#60;? while(++$i&#60;101)echo $i%15?$i%5?$i%3?$i:'Fizz':'Buzz':'FizzBuzz',"\n";</code></pre>
评论 #2982291 未加载
评论 #2981676 未加载