Integers greater than 1 have more than one factor: a factor is a number that divides evenly into an integer. The number 6 has factors of 1, 2, 3, and 6. Ignoring the number 6 itself, it's interesting to note that 1+2+3=6, which makes 6 a "perfect number". The number 14 has factors 1, 2, 7, and 14. Their sum is 10.In the ongoing quest for perfect numbers, write a program that reads a single integer (1
Integers greater than 1 have more than one factor: a factor is a number that divides evenly into an integer. The number 6 has factors of 1, 2, 3, and 6. Ignoring the number 6 itself, it's interesting to note that 1+2+3=6, which makes 6 a "perfect number". The number 14 has factors 1, 2, 7, and 14. Their sum (ignoring 14 itself) is 10. In the ongoing quest for perfect numbers, write a program that reads a single integer (1 <= N <= 10,000,000) and prints the sum of its factors (not including the number itself).