Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive integer, repla...
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + ...