// 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>

#include <math.h>

using namespace std;

int main()
{
   int scale[] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000 };
   int v = 1653134;
   int digit3 = (v / scale[(int)log10((double)v) - 2]) % 10;
   cout << digit3 << endl;
}
