Posted on February 5, 2010 by kturley // numreverse.cpp : main project file. #include <iostream> #include <string> #include <fstream> #include <iomanip> //required to use setw() #include <cstdio> using namespace System; using namespace std; void NumReverse(int reverseme); int main(array<system ::String ^> ^args) { NumReverse(12345678); return 0; } void NumReverse(int reverseme) { //base case: 1 digit. if((reverseme/10) < 1) { cout << reverseme << "...is the mirrored number." << endl; system("pause"); system("cls"); return ; } //recursive step: cout << (reverseme%10); NumReverse(reverseme/10); }