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
There are three bucket...Apple,Orange and Apple+Orange....On each Bucket one of the following labels are there..'A','O','A+O'...all this labels are not correctly patched on Bucket..identify which bucket contains What? You can not see bucket..u can pick any number of fruit from any basket...???
hi friends i am b-tech in computer science having interview of State bank of india clerk day on 30 th april. I want to know the answer of question:"you r B.tech in C.S. why do u want to become a bank clerk?" please help.Its my humble request.
Why is it that a single, all – encompassing metric cannot be developed for programme complexity or programme quality?
what does complexity means in an algorithim?? how it is calcutaed?
pls its urgent!!!!!!! can u tell me which companies are hiring fresher for industrail training???i know only two companies cmc which is in bandra n biz tech solution in kandivali. can anyone knows other companies??how much fees r they taking?? what about biz technology?this company is good to join if anyone has did d industrial training in biz technology then pls reply as urgent as possible. thank you ....waiting for replyyyyy
What does "stdafx"header file do?
There are n points and each point enclose with x and y axis form a rectangle and find the point using a program which forms the smallest rectangle?
what are basic step involved in embedded system software development?
Reverse the link list without creating new list ?
which is better php,asp.net,jsp? and why?
Apply Newton?s method to compute the approximate value of root 2. Start the iteration from x0=1, and obtain two iterations.
hello sir,pls fdorward previous group-I exam papers .....
what we have to say about hobbies,strong points,weak points
how to cable size by Amp with example
/bin/bash is missing.