answer in C++