Question: Write a program that outputs the amount of deficient numbers, perfect numbers, and abundant numbers between 1 and some upper bound specified by the user.

Write a program that outputs the amount of deficient numbers, perfect numbers, and abundant numbers between 1 and some upper bound specified by the user. Thats it! Get coding!
A proper divisor of a positive integer is a divisor that is strictly less than the number.
Ex.20 has proper divisors 1,2,4,5, & 10. While 20 is a divisor of itself, it is not a proper divisor.
A perfect number is a positive integer that is equal to the sum of its proper divisors.
Ex.6 has proper divisors 1,2, & 3. The sum of these divisors is 6, making 6 a perfect number.
An abundant number is a positive integer that is less than the sum of its proper divisors.
Ex.18 has proper divisors 1,2,3,6, & 9. The sum of these divisors is 21, making 18 an abundant number.
A deficient number is a positive integer that is greater than the sum of its proper divisors.
Ex.10 has proper divisors 1,2, & 5. The sum of these divisors is 8, making 10 a deficient number.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!