Write a program to input a no. and check whether it is a happy number or not. ( using bufferedreader statement)
Answers
Answered by
1
In this program, we need to determine whether a given number is a happy number or not.
Happy number
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.
For example, 32 is a happy number as the process yields 1 as follows
Please mark me brilliant pleaseeeeeee and follow me
Similar questions