Fizzbuzz in C for console I imagine I get a minuscule performance improvement by doing the %3 as a branch off the %5 rather than the other way round or as an if '%15'. Am I correct about that? (I know there is no practical difference)

#include &lt;stdio.h&gt;

///Write a program that prints the numbers from 1 to 100.
///But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz".
///For numbers which are multiples of both three and five print "FizzBuzz".
int main()
{
    int a=1;
    while (a&lt;101)
    {
        if (a%5==0)
        {
            if (a%3==0)
            {
                printf("FizzBuzz\n");
            }
            else
            {
                printf("Buzz\n");
            }
        }
        else if(a%3==0)
        {
            printf("Fizz\n");
        }
        else
        {
            printf("%d\n",a);
        }
        a++;
    }
return 0;
}
I have my doubts that any method is significantly faster than another given the sink-hole of time that printf() is, but here is another approach

#define FB "FizzBuzz\n"
#define F "Fizz\n"
#define B "Buzz\n"
#define N "%d\n"

int main(void) {
  static const char *fmt[15] = {
      FB, N, N, F, N, B, F, N, N, F, B, N, F, N, N };
  for (int a = 1; a &lt;= 100; a++) {
    printf(fmt[a % 15], a);
  }
  return 0;
}