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.
Beginner2022-03-25Added 14 answers
If the digit you require is n places from the right (indexed from zero so the units place is at position 0, the tens place is at 1 and so forth), then the following function will return the n-th digit of the decimal integer x:
You can replace 10 everywhere in the formula with any base b to generalise it.
Which expression has both 8 and n as factors???
One number is 2 more than 3 times another. Their sum is 22. Find the numbers
Perform the indicated operation and simplify the result. Leave your answer in factored form
An ordered pair set is referred to as a ___?
Please, can u convert 3.16 (6 repeating) to fraction.
Write an algebraic expression for the statement '6 less than the quotient of x divided by 3 equals 2'.
What is converted into a fraction?
The mixed fraction representation of 7/3 is...
How to write the algebraic expression given: the quotient of 5 plus d and 12 minus w?
Express 200+30+5+4100+71000 as a decimal number and find its hundredths digit.
Find four equivalent fractions of the given fraction:
How to find the greatest common factor of ?