News for hackers. Stuff that matters.
Re:The Fastest FizzBuzz in the West by wott on Wednesday August 31, 2016 @02:31AM (#12396377)
> Fizzbuzz is one of those problems where there's really no clever hidden golfy solution better than the plain old first-reaction naive approach: an iteration with if/elsif/elsif/else.

There are. With a funky calculation.

For example, taken from Rosetta C version:

  for (int i=0;++i<101;puts("")) {
    char f[] = "FizzBuzz%d";
    f[8-i%5&12]=0;
    printf (f+(-i%3&4+f[8]/8), i);
  }
You might say the calculations are hidden if/else, but well...
Re:The Fastest FizzBuzz in the West by jgh on Wednesday August 31, 2016 @02:50AM (#12396424)
It's possible to do with a switch statement as well (in C).

Edit: Would be nice if the original author of that code snippet threw in some parentheses for a little clarity with the operator precedence.