Perfect Number in JAVA
✹ A number is said to be a perfect number if the sum of its positive divisors excluding the number itself is equal to that number
For Example:
6 =1, 2, 3, 6 =(1+2+3) = 6
12 = 1, 2, 3, 6, 12 =(1+2+3+6) = 12
28 = 1, 2, 4, 7, 14, 28 =(1+2+4+7+14) = 28
No comments