I have an assignment to write a recursive function that writes the digits of a positive integer in reverse order. My problem is that the function doesn\'t display the reverse co
You could also do:
int reverse(int number,int n) { if(number > n) { cout << number << endl; reverse(number-1,n); }
But you should get rid of first number printing twice.