Example. 123456, and we want the third from the right (\'4\') out.
The idea in practise is to access each digit seperately (ie. 6 5 4 3 2 1).
C/C++/C# preferred.
Following code will give nth digit from right in a number:
public void getDigit(long n,int k){ int i=0; long r =0; while(i