How to calculate the digits of a positive integer?

How to calculate the digits of a positive integer?

Note: This article will be emailed to your friend.

I just came across the need to calculate the digits of a number. It sounds trivial as we can see the digits & count them easily.
The challenge is how to find them (with least effort) computationally?
Solution:
1 + (int) (Math.log(i) / base10)
where base10 = Math.log(10)

Read the rest of this article (46 words)

Please fill in the following fields

* - Required

Your Name: *

Your E-Mail: *

Your Remarks:

Friend's Name: *

Friend's E-Mail: *

Protected by Comment Guard Pro