Perfect Number Java Loop Problem - Please Help!?

The problem reads a perfect number is defined as a positive integer which is the sum of its proper divisors. Or in other words, the sum of the positive divisors excluding itself. The first perfect number is 6 because 1 + 2 + 3 = 6. The next perfect number is 28 because 1+2+4+7+14= 28. Write a program that takes in a number from the user and prints out whether their number is perfect or not. If it is perfect the display the summation equation. Otherwise, simply state that it is not perfect.

Please help. I'm so confused.

Re: Perfect Number Java Loop Problem - Please Help!?

What are you confused on? What have you done so far (i.e. code)?

If you're not sure where to start, I suggest reading The Java™ Tutorials.

Re: Perfect Number Java Loop Problem - Please Help!?

First you need to come up with the algorithm to solve the problem.

Take a paper and pencil and figure out how to solve the problem, or ask google.

When you have an algorithm for solving the problem, then try writing a program to solve it. When you have problems getting the code to work, post it here with your questions.