+ 8

Challenge:: Happy Numbers

Take a positive number. Replace it by the sum of the squares of its digits. Continue the process until the result is a one digit number. If the number ends in 1 as the one digit number, it is said to be a Happy Number. The Challenge is to Write a code to output all the Happy Number within a given range. For example 31 3²+1²=10 10 1²+0²=1 So 31 is a happy number. Come on coders, show your talent.

1st Aug 2017, 2:53 PM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar
8 Answers
1st Aug 2017, 4:26 PM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 20
https://code.sololearn.com/cQrj6XdvguyT/?ref=app
28th Feb 2018, 3:51 PM
Danijel Ivanović
Danijel Ivanović - avatar
1st Aug 2017, 4:43 PM
Garikai
Garikai - avatar
+ 3
https://code.sololearn.com/cuJ6ekgSTyE4/?ref=app
1st Aug 2017, 5:14 PM
Kartikey Sahu
Kartikey Sahu - avatar
27th Sep 2017, 1:23 AM
ysraelcon
ysraelcon - avatar
+ 1
I'm going to work on this later once I finish another challenge I'm working on.
1st Aug 2017, 10:21 PM
Vari93
Vari93 - avatar
+ 1
Here ya go! Checks for valid input. https://code.sololearn.com/cApaluRzZbiI/?ref=app
2nd Aug 2017, 10:24 AM
Vari93
Vari93 - avatar
1st Aug 2017, 6:02 PM
Garikai
Garikai - avatar