• Teaser Home

    Clean Code Developer School

    Saubere Softwareentwicklung üben – regelmäßig, fokussiert, individuell, angeleitet

Happy Numbers

Function Kata “Happy Numbers”

Write a function to determine whether a given number is “happy” or not.

A “happy number” is a number where the sum of the squares of its digits “in the long run” is equal to 1. Example:

Variations #1

Find all “happy numbers” within a range of numbers, e.g. from 10 to 20.