The instruction is to display the integer in reverse order -- not to compute the actual reverse order integer.
1 2 3 4 5 6 7 8 9 10 11
void display_in_reverse( int n )
{
cout << /* one digit of n */ ;
n = /* do something to n */
if (/* when do I not stop? */)
{
display_in_reverse( n );
}
}
Be sure to consider what happens when n is zero. Because you want the following things to display properly: