Function to grab specific digits from a number?
Recently I’ve been thinking a lot about grabbing digits from numbers, for things like calculating multiplication persistence, i.e. turning into a . I’ve been able to come up with
to output the number of digits of the given number x, as well as
which outputs the first n digits of any number x. But that’s about as far as I’ve been able to think up. Is there any way to construct a function that retrieves the nth digit of a given number? Forgive me if my notation or comprehension is poor, I have no formal education in this field of maths.
Some of you may remember solving equations with decimals by looking back at the school years, yet it is also easy to get lost in this seemingly simple pre-algebra field. If working with decimals sounds too complex to you or you require a reminder, have a look at the list of decimals questions and answers below to see how it is done.
At the same time, if you are still not sure about finding the right solution, start with the high school Math and see more than one solution as you seek similarities.