I'm a student whose taking comp 110, and my professor gave the class a practice exam to help us study for our exam on tuesday.
The question is:
A perfect number is a positive integer that is equal to the sum of its proper divisors. A proper divisor is a positive integer other than the number itself that divides the number evenly (i.e., no remainder).
For example, six is a perfect number because the sum of its proper divisors 1,2, and 3 is equal to 6. Eight is not a perfect number, because 1+2+4 doesn not add up to eight. Write a Java Method, public static boolean Perfect (int n), to return true if n is a perfect number and false, otherwise.
Use the function to print all perfect numbers from the interval [6, 500]
Thanks so much to whoever solves this. Something very similar may appear on my exam this tuesday. I'd like to study the solution.