basics · beginner · ~15 min
Order if/else branches so the most specific case wins.
Implement const char *fizzbuzz_word(int n) returning "FizzBuzz" if n is divisible by 15, "Fizz" if by 3, "Buzz" if by 5, otherwise an empty string "".
const char *fizzbuzz_word(int n) {
/* TODO */
return "";
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.