Define a function digit(n, k) in the program that can extract the k-th digit from the right of the integer n.
digit(n, k)
Positive integers n and k.
A single digit.
31859 3
8
Using your Hydro universal account