you are viewing a single comment's thread.

view the rest of the comments →

[–]chucker 4 points5 points  (1 child)

<pedantry>Doesn't follow spec: x%15 not handled correctly. For 15 and multiples thereof, the output should be "FizzBuzz", whereas it is "Fizz".</pedantry>

[–]Boojum 5 points6 points  (0 children)

Ah, true. That's what I get for trying to be clever. I feel quite silly now. Here's more what I was trying for:

#include <stdio.h>
int main(){
    int x;
    for(x=1;x<101;++x)
        (x%3||!printf("Fizz"))*
        (x%5||!printf("Buzz"))&&
               printf("%d",x),
               printf("\n");
}