Add a C++ code to calculate wages