I am also doing the Stanford course and the book at the same time. I find the book is quite a bit ahead of the course but it is still good fun.
I completed this problem earlier today. The way I went round it was to % 10 the entered number, then take that remaindered number and add it to another variable i called numberReversed. I then multiplied numberReversed by 10.