0
you could store the answer as a string and use std::reverse (). this will modify the string variable and reverse it.
example:
#include <string>
int main ()
{
\\store answer in a string
std::string answer ("TheAnswerHere");
\\reverse it
std::reverse(answer.begin(), answer.end());
\\print it now that it is reversed
std::cout << "In reverse is:\n" << answer;
}