// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>

using namespace std;

int main()
{
   int n = 0;
   int a[12];
   cout << "Enter number: ";
   cin >> n;
   int tmp = n;
   int ix = 0;
   while(tmp>0)
   {
      a[ix] = tmp % 10;
      ix++;
      tmp = tmp / 10;
   }
   for(int i=ix-1;i>=0;i--)
   {
      cout << a[i];
   }
   cout << endl;
   return 0;
}
