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 / 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 |
How do aeroplanes fly? Why can some fly up-side down?
how will u recieve idoc
explain bug tracking system in detail.
i am astubent of BE3rd year currently in 6th semester branch information technology till now i have 73% near about in each semester the problem with me is that i have got only 58%in 12th class n 55%in 10th class bcoz of my health now i am ok i have got 2 year loss also bcoz i have not giveen the exam in class 12th rite now i am prep for GATE i am working hard pls tell will i get a good job in future in the good company bcoz my inter percent were not gud pls tell me help me pls
How would you Update the rows which are divisible by 10, given a set of numbers in column?
why this companay? For example: Why Dell?
Sorting is not possible by using which of the following methods? (Insertion, Selection, Exchange, Deletion)
can you provide me uniken pvt ltd. technical interview question and answer?
what is the print server
a book consists of chapter ,chapter consist of sections and sections consists of subsections.construct a tree and print the node.
Hi, what is the meaning of DOCUMENTUM,how and what testers have to do with it?
WAP in Java to print the format: ABC BCD CDE EFG