[2 points] A perfect number is a positive integer that equals the
sum of its (exact) positive integer divisors, including unity (one) but
excluding the number itself. The number 6 is the smallest
such number because 6 = 1 + 2 + 3. Also, as a non-example,
12 is NOT a perfect number because
its factors, excluding 12 itself,
are 1, 2, 3, 4, and 6, and adding all these factors
equals 1+2+3+4+6 = 16 which is not equal to 12.
Write a program to compute and print the first four
perfect numbers. You must be able to explain in great detail
what the program does during the time of grading/interview with
your proctor. I will be instructing proctors to ask
questions such as "What happens if I change this value to this value,"
or "Explain how this for-loop works," or "How many times is this
for-loop executed," or some similar question. Something similar
MAY appear in the midterm exam. No guarantees but you never know.
If you are having trouble with while statement, check
the notes..
There are some hints on hw#3. check out FAQs Page