Question: An integer p is called a divisor of another integer n if p divides n. For example, 3 is a divisor of 6. Allthedivisorsof6are1,2,3,and6. Adivisorpofniscalledproper

An integer p is called a divisor of another integer n if p divides n. For example, 3 is a divisor of 6. Allthedivisorsof6are1,2,3,and6. Adivisorpofniscalledproper ifp=n. Theproper divisors of 6 are 1, 2, and 3. The only proper divisor of 5 is 1, and the proper divisors of 24 are 1, 2, 3, 4, 6, 8, and 12.

An integer n is called deficient if the sum of its proper divisors is less than n. Example: 5 is deficient because 1 is less than 5. An integer n is called perfect if the sum of its proper divisors is equal to n. Example: 6 is perfect because 1+2+3 = 6. Finally, an integer n is called abundant if the sum of its proper divisors is greater than n. Example: 24 is abundant because 1+2+3+4+6+8+12 = 36 > 24.

write a computer programm that reads a single integer from input and determines whether the integer is deficient , perfect ,or abundant as shown in the examples . Do not write any messages before reading the input and do not write any other messages than what is shown in the ouptput

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!