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...


I do not understand this topic someone pls help. I was absent during discussion


Write a Java program that reads a positive, non-zero integer as input and checks if the<br>integer is deficient, perfect, or abundant.<br>A positive, non-zero integer, N, is said to be perfect if the sum of its positive proper divisors<br>(i.e., the positive integers, other than N itself, that divide N exactly) is equal to the number<br>itself. If this sum is less than N, the number is said to be deficient. If the sum is greater than<br>N, the number is said to be abundant.<br>The first few perfect numbers are 6, 28, 496, and 8128.<br>| Illustrations:<br>|Number<br>6<br>28<br>For example, the number 6 is perfect, since 6 = 1 + 2 + 3, the number 8 is deficient, since<br>8 >1 +2+ 4, while the number 12 is abundant, since 12<1+ 2+ 3+ 4 + 6.<br>| Factors of the number less than itself | Sum of Factors<br>| 3, 2, 1<br>14, 7, 4, 2, 1<br>6.<br>|28<br>Sample Input/Output:<br>Depicted below are sample outputs when the program is executed (the items in bold<br>characters are input from the user, while the items in bold italic are calculated and<br>printed by the program):<br>Input N: 6<br>6 is perfect.<br>Input N: 5<br>Input N: 18<br>5 is deficient.<br>18 is abundant.<br>

Extracted text: 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. The first few perfect numbers are 6, 28, 496, and 8128. | Illustrations: |Number 6 28 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.="" |="" factors="" of="" the="" number="" less="" than="" itself="" |="" sum="" of="" factors="" |="" 3,="" 2,="" 1="" 14,="" 7,="" 4,="" 2,="" 1="" 6.="" |28="" sample="" input/output:="" depicted="" below="" are="" sample="" outputs="" when="" the="" program="" is="" executed="" (the="" items="" in="" bold="" characters="" are="" input="" from="" the="" user,="" while="" the="" items="" in="" bold="" italic="" are="" calculated="" and="" printed="" by="" the="" program):="" input="" n:="" 6="" 6="" is="" perfect.="" input="" n:="" 5="" input="" n:="" 18="" 5="" is="" deficient.="" 18="" is="">

Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here