1. ## Recursion

I need some help on my program. By using recursion, i have to write a program that give the output in vertical order... e.g. if i input 1234, the ouput will be:
1
2
3
4
I don't know how the structure works, and i have no idea how to begin...

2. hint: you will need '/' and '%' operators.

'/' will chop the number down by tenths.

1234 / 10 = 123 (note, really = 123.4, but .4 chopped off since dealing with int here)

'%' will extract the right most digit from the number.

1234 % 10 = 4.

just add some recursion and you solved it!

3. This is a program which is backwards.. how can i reverse it?

#include <iostream>
using namespace std;

void printForwards( int );

int main( void )
{
int num;

cout << "Please enter a positive integer: " << endl;
cin >> num;

cout << "Testing printForwards" << endl;
printForwards( num );

return 0;
}
void printForwards( int num )
{
if( num > 0 )
{
cout << ( num % 10 ) << endl;
printForwards( num / 10 );
}
}

4. Study the difference between

cout << ( num % 10 ) << endl;
printForwards( num / 10 );

and

PrintForwards( num / 10 );
cout << ( num % 10 ) << endl;

5. ## thank you

thank u for ur help!