JAVA program to check for a HAPPY number for ICSE Class X.
Share
JAVA program to check for a HAPPY number for ICSE Class X.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
The happy number can be defined as a number which will yield 1 when it is replaced by the sum of the square of its digits repeatedly. If this process results in an endless cycle of numbers containing 4, then the number is called an unhappy number. ... Else, replace the number with the sum of the square of digits.