Need help with this problem. Note: I have to use loops and nothing ahead. I dont understand where I would start and how I would do it
There is a sequence obtained by summing the squares of the digits of a
number repeatedly. If the sequence converges to 1 in fewer than 15 steps,
this number is considered a happy number.
A perfect number is a positive integer that is equal to the sum of its proper
positive divisors (i.e. the sum of its positive divisors excluding the
e.g. 6 is a perfect number because 1+2+3=6.
A number is practical if it is neither happy nor perfect.
Level 3: Make a program that allows the user to enter a number and it will tell them if the
number entered is a happy number or not. The user should be able to keep entering numbers
until -1 is entered to quit the program.
Level 4: In addition to telling the user whether the number is happy, tell them if the number
is perfect and if the number is practical.