Bloomberg Interview Question

I was asked to write a macro in c++