Goldman Sachs interview question

write cpp code on paper, synthetically correct and compile-able.