I have recently purchased a c++ book...and it asked to do the following
program:
A perfect number is a positive integer such that the sum of the proper
divisors equals to the number. Thus, 28=1+2+4+7+14 is a perfect number. If
the sum of the divisors is less than the number, it is deficient. If the sum
exceeds the number, it's abundant.
a) Write an interactive program that allows the user to enter a positive
integer and then displays the result, indicating whether the number entered
is perfect, deficient, or abundant.
b) Wrtie another interactive program that allows the user to enter a
positive integer N and then displays all perfect numbers less than or equal
to N.
*Program should allows the user the option of continuing or quitting*
Any help would be appreciated...thanks!
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
|