An integer number is said to be a perfect number if its
factors, including 1 but not the number itself, sum to the
number. For example, 6 is a perfect number because 6 = 1 + 2
+ 3. Write a Java program, which finds and prints all
perfect numbers that are less than 1600.
Answer Posted / vinoliya rani.e
If the sum of the divisors exactly equals the number, the
number is called perfect.
For example, 15 has divisors 1, 3 and 5. If we add these
together, we get 1 + 3 + 5 = 9 which is less than 15, so 15
is a deficient number. On the other hand, 12 has divisors 1,
2, 3, 4 and 6. Adding these up gives 1 + 2 + 3 + 4 + 6 = 16
which is greater than 12, so 12 is an abundant number. The
number 6 has divisors 1, 2 and 3. Adding these gives 1 + 2 +
3 = 6, so 6 is a perfect number.
Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
I want the syllabus of Section Enginner(Signal & Telecom) of RRB Exam
what is means of admistrative distance
minimum percentage in B.E in(INFORMATION TECHNOLOGY) to be eligible for IES exam qualification and also for reserved categories.are IT engineers are eligible for giving IES exams? please reply soon.
WHAT IS THE DIff Between candidate key and primary key?
why only j2me is used for mobile???
Find the maximum stress intensity in the section?
what is different between static block and public static void main??
what is the formula/ ratio for hollow block? considering to a 40 kgs of portland cement.
which/why unix commands are simpler rather than complex tasks
What will be the sql query to list the employee names those are getting 3rd highest salary ?
WHERE CAN I GET SQL SERVER NOTES SOFT COPY?
Difference between software process model and software process.?
I have Cleared Bank of India Clerical Examination.I just want to know how to prepare for interview and what are the parriculars that I have to submit......Pls someone help me with it
what is the difference between physical address and logical address?
what is the difference a zero argument constructor and a default constructor?