Iterative Program
A perfect integer is a positive integer that is equal to the sum of all of its proper divisors. A proper divisor of an integer n is an integer between 1 (inclusive) and n (exclusive) that divides n with no remainder. For example, 6 is a perfect number because 6 = 1 + 2 + 3.
Write a Java program that decides whether an integer is a perfect number.