A happy number is a positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1, when this process do not end in 1 are unhappy numbers (or sad numbers), ends in 1 are happy numbers.
For example, Positive Integer = 103, Sum of Digits of 103 = 1^2 + 0^2 + 3^2 = 1 + 0 + 9 = 10
10 = 1^2 + 0^2 = 1 + 0 = 1, So 103 is a happy number.