I'm dividing n into it's digits (so 19 becomes 1 and 9) and then adding the square of those numbers to the sum.
Yeah I got that, but I don't see sum += n*n anywhere
The line 'sum += e * e' is what sums the digits
Ahh, I missed the while loop there. Oops
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm dividing n into it's digits (so 19 becomes 1 and 9) and then adding the square of those numbers to the sum.
Yeah I got that, but I don't see sum += n*n anywhere
The line 'sum += e * e' is what sums the digits
Ahh, I missed the while loop there. Oops