I have a source file here:
#include <FizzBuzz.h> fizzbuzz
And I want to make "
fizzbuzz" turn into a FizzBuzz program solely through the preprocessor.
Your task is to write a
FizzBuzz.h that uses only preprocessor directives (things like include, define, etc.) to create a working FizzBuzz program. Specifically, I want to see the use of macros, which will be required to make this work (at minimum, defining
fizzbuzz to be some code).
However, to make sure people try and take full advantage of the power of macros, your score will be defined as the sum of the cubes of the length of the definition portion (the part after
#define <symbol>) of each macro.
So, for example, the following file:
#define A 123 #define B A+A #define C B*2+A
would have a total score of 179 (3^3 + 3^3 + 5^3). As a rule, I want multiple shorter lines instead of one long line.