I need an equation that can be easily changed to output the digit which is held in the 1's slot, 10's slot, 100's slot, etc.
EX. I want the 100's digit in 6810 EX2. I want the 1's digit in 29115
What the equation should do is that once it is done calculating, all that is left is the selected "slot" or whatever it is called, nothing else, no other numbers, just the number in the slot I wanted
It would help if the equation was really simple, but anything helps
If you want the $10^k$'s digit of $n$, you should compute $\left\lfloor\dfrac{n}{10^k}\right\rfloor \pmod{10}$.
Ex1: If you want the $100 = 10^2$ digit of $6810$, then $\left\lfloor\dfrac{6810}{10^2}\right\rfloor = \lfloor 68.1\rfloor = 68 \equiv \boxed{8} \pmod{10}$.
Ex2: If you want the $1 = 10^0$ digit of $29115$, then $\left\lfloor\dfrac{29115}{10^0}\right\rfloor = \lfloor 29115\rfloor = 29115 \equiv \boxed{5} \pmod{10}$.