one exercise for C++ training