add c++ answer for code iq