|
|
|
|
|
by Steve_Baker
5193 days ago
|
|
Every time fizzbuzz comes up, someone has to post a solution it seems, but why does everyone write such huge fizzbuzz programs? for(int i=1; i <= 100; i++)
printf((char *[]){"%d\n","Buzz\n","Fizz\n","FizzBuzz\n"}[((i%3==0)<<1)|((i%5)==0)], i);
|
|
Why they do it one way or another is an occasionally interesting follow up question.