http://golf.shinh.org/p.rb?FizzBuzz
Problem:
Print integers 1 to 100, but replace multiples of 3 with "Fizz" and multiples of 5 with "Buzz" and multiples of both with "FizzBuzz"
Challenge:
Do it in the least amount of bytes possible.
My PHP Entry(83 bytes): wrote:<?for($i=1;$i<101;$i++)echo(($i%3<1?"Fizz":'').($i%5<1?"Buzz": (($i%3?$i:''))."\n")?>
A friend's Ruby Entry(65 bytes): wrote:(1..100).map{|n|puts"FizzBuzz#{n}"[n%3<1?0:n%5<1?4:8,n%15<1?8:4]}
Brainfuck! (9951 Bytes) wrote:http://zorachus.net/brainfuck.bf
I didn't use looping in Brainfuck, just did it line-by-line, but by God, I did it!
This should be interesting.
Edit: If you go to the main site of http://zorachus.net, you'll see random XKCD comics, and then, of course, a link to this site. I'm hotlinking, but my site has less than 20 people that have even seen it, so I'm assuming it's not a problem. If it is, of course, I'll stop hotlinking immediately.