# Thread: Test quality of number

1. Member Join Date
Oct 2014
Posts
2
Rep Power
0

## Test quality of number

I Dont know what to do :(

Problem 2: (Perfect.java)
Write a Java program that reads a positive, non-zero integer as input and checks if the integer is deficient, perfect, or abundant.
A positive, non-zero integer, N, is said to be perfect if the sum of its positive proper divisors (i.e., the positive integers, other than N itself, that divide N exactly) is equal to the number itself. If this sum is less than N, the number is said to be deficient. If the sum is greater than N, the number is said to be abundant.
For example, the number 6 is perfect, since 6 = 1 + 2 + 3, the number 8 is deficient, since 8 > 1 + 2 + 4, while the number 12 is abundant, since 12 < 1 + 2 + 3 + 4 + 6.
Sample Output:
Input N: 5
5 is deficient.
Input N: 6
6 is perfect.
Input N: 18
18 is abundant.  Reply With Quote

2. ## Re: Pls help me idnk what to do :(( Originally Posted by Lloydaaa I Dont know what to do :(
Study the Java language?

kind regards,

Jos  Reply With Quote

3. ## Re: Test quality of number

What have you tried?
Be sure to wrap and code you post in code tags.  Reply With Quote

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•