I would like to construct a function thats output is equal to the number of digits used to represent the number given as an input.
$f(5) = 1$
$f(9) = 1$
$f(13) = 2$
$f(99) = 2$
$f(682) = 3$
$f(999) = 3$
Is it even possible with one function and if not, why not?
Can anyone help me with this or at least point me in the right direction?