Start by thinking "how would I do that manually?"
Write the number on a blackboard then take the lowest digit out and write that down, then rub it out.
If there are any digits left you do it again until there aren't.
So you need three things:
1) A loop that stops when you run out of digits. Hint: think about the
do
...
while
loop
2) A way to extract the least significant digit. Hint: what does the modulus operator do?
3) A way to remove the least significant digit. Hint: how does integer division differ from floating point division?
If you are having problems getting started at all, then this may help:
How to Write Code to Solve a Problem, A Beginner's Guide[
^]