I point out that there's no macro involved here in your code, there are macro variables, which is a different thing that a macro. And its impossible to see how a macro would apply in this assignment, although it is possible to see how macro variables apply here as you have shown. If your professor is giving you an assignment and he doesn't distinguish between these two, then your professor needs to learn the proper terminology.
By the way, now that you have shown us actual code, what is wrong with the code?
... View more