Computer Science, asked by avanish9bstjosephgkp, 11 months ago

Write a program for Java to print whether a number is perfect ,abundant or deficient number​

Answers

Answered by snakeeye86
5

Answer:

PROGRAM

Suppose you take a positive integer n and add its (positive) divisors. E.g. if n=18, then sum=1+2+3+6+9+18=39. In general, when we do this with n, one of the following three happens:

If the sum is

n is said to be

e.g.

Less than 2n

Deficient number

1,2,3,4,5,8,9

Equal to 2n

Perfect number

6,28,496

Greater than 2n

Abundant number

12,18,20,24,30

WAP that inputs a number and determines whether it is a Deficient number or a Perfect number or a Abundant number.

SAMPLE DATA

Enter a no: 28 It is a Perfect number

Enter a no: 30 It is an Abundant number

Answered by sujatamohantykulu
0

Answer:

sorry I don't know the answer

Similar questions