12,448,327 members (51,249 online)
Rate this:
See more:
So, here is the problem:

Suppose m and n are integers and m is nonozero. Recall that m is called a divisor of n if n = mt for some integer t; that is, when m divides n, the remainder is 0. Moreover, m is called a proper divisor of n if m < n and m divides n. A positive integer is called perfect if it is the sum of its positive proper divisors. For example, the positive proper divisiors of 28 are 1, 2, 4, 7, and 14 and 1 + 2 + 4 + 7 + 14 = 28. Therefore, 28 is a perfect. Write a program that do the following:

a. Output the first four perfect numbers
b. Input a positive integer number and determine whether the integer is perfect. Validate the input. Ask the user to enter another input until the user enters 0.

You are required to implement the following function:

bool sumOfAllProperDivisors (int m)
The function returns true if the sum of positive proper divisors of number m is equal to m;otherwise, it returns false.

You NEED to use bool sumOfAllProperDivisors. How can we make this program work?
Posted 15-Oct-12 4:09am
Updated 15-Oct-12 4:13am
v3

First: this is not a problem. This is homework. Second: How do you make this program work? By writing some code. Pay attention in class. Read your textbook.
Sergey Alexandrovich Kryukov 15-Oct-12 15:00pm

This is the answer. Even though there is no a question.
--SA
geekbond 15-Oct-12 10:29am

Oh, sorry. CP does not answer homework. Listen in class and atleast you could've written some of what you've tried and we'll be happy to point you in the right direction.

Rate this:

## Solution 1

Why do we not do your homework. (Compliments of JSOP)[^]

This is not a difficult problem. The logic required is clearly laid out for you in your question text. I would suggest you break down the question into its smaller components and solve each component separately. Then tie the components together into your final solution.

Top Experts
Last 24hrsThis month
 ppolymorphe 250 OriginalGriff 180 Jochen Arndt 175 Richard Deeming 155 F-ES Sitecore 145
 OriginalGriff 5,683 Karthik Bangalore 3,335 ppolymorphe 3,262 Maciej Los 2,872 Richard Deeming 2,695