Perfect, Deficient, and Abundant Numbers: Understanding the Sum of Factors

The sum of factors indicates whether numbers are abundant, perfect, or deficient. Calculate the sum of factors excluding the number itself.

The sum of factors indicates whether numbers are abundant, perfect, or deficient.
Calculate the sum of factors excluding the number itself.

After factorizing the input number, calculate the sum of factors using an accumulator variable.
Compare the sum with the number itself. If the sum is less than the number, it's a deficient number; otherwise, if it's greater, it's an abundant number. The sum of factors, if equal to the factorized number, identifies a perfect number.

After watching the video, complete the following exercise:
find all perfect numbers between 0 and 1000

Have fun.