This isn't actually homework, I'm just looking through some questions in a discrete maths book before I start computer science next week.
Anyway, one of the questions asks me to write a program to perform this algorithm (which it explains). The part I'm stuck with is how to take the 9 digit number and "split" it into single integers, so the calculations can be performed on each digit.
I thought of dividing the number by 100,000,000 and then taking the integer value of this to get the first digit, but I'm not sure how to get the others.
If this was in PHP or something I could just use explode(), but I guess that's not the point here :P