I was wondering if This is the Best Way to Use #define : Hello everyone (my first post on this website),

I am teaching myself C language by reading the **"C by example"** book by **Greg Perry**, and I just finished chapter 6 **"Preprocessor Directives".**
At the end of each chapter, there are review exercises to complete (in order to make sure you understand what the topic is talking about and how to apply it.

I am on the 4th review exercise for chapter 6, and I was wondering if this is the right way to do it **(The exercise is written at the top of the picture)**:

[The code I wrote for the exercise][1]


  [1]: http://i.stack.imgur.com/2VAov.png

My question: Is this the best way to complete the exercise, or is there an easier way which is a lot more efficient?

Thank you in advance for the help :)