You'd better explain why you need it.

If this is a kind of school task, then you are really supposed to divide number by 10 several times keeping remainders.

Here is a short explanation:
Wiki:...