I saw a question on a math forum a while back where a person was discussing adding up the digits in a number over and over again until a single digit is achieved. (i.e. \"362\"
int digit_sum(int n) Do if (n<10) return n; Exit do else n=n%10 + digit_sum(n/10); Loop