Comment

Comment by CamperBob2

As a C programmer, that's the worst FizzBuzz implementation ever. You're not supposed to special-case % 15, just

    bool m3 = !(i % 3);
    bool m5 = !(i % 5);
    if (m3) printf("Fizz");
    if (m5) printf("Buzz");
    if (m3 || m5) printf("\n");
You can turn in your visitor badge at the front desk, and they'll call you an Uber.
parent CamperBob2 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton