Comment

Comment by acqq

And also C based on the same idea as my Python (but this has to ? for 0s):

    int i;
    char* a[] = { 0, "Buzz", "Fizz", "FizzBuzz" };
    char* f[] = { "%s\n", "%d\n" };
    for ( i = 1; i < 101; i++ ) {
        char* s = a[ (i%3==0)*2 + (i%5==0) ];
        printf( f[!s], s ? s : i );
    }
parent acqq 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton