Write a program to print Reverse of any number code example
Example: print reverse number
void printReverse(int n) {
if (n < 1) return;
cout << n << endl;
printReverse(n - 1);
}
printReverse(10); /// 10 9 8 7 6 5 4 3 2 1
void printReverse(int n) {
if (n < 1) return;
cout << n << endl;
printReverse(n - 1);
}
printReverse(10); /// 10 9 8 7 6 5 4 3 2 1