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
what is the difference between a decision statement and ea loop statement?
what is trx?
Index of an Array containing 'n' aliment varies from________to_______
Tell me all about production of drought and its losses In the boiler?
how to count number of 3's in 100
How would Nvidia increase the core clock speed anymore?
can 25mm thik and 8.5x8.5 size cast iron plate can bear a weight of 250 tons if it can what would be the compostion
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.
hi i have selected for nda and could please send me the courses offered in nda regarding engineering and all other courses????
In HSE what is Lost time accident? why it is to be reported within 48 hrs to gov.authorities ?
write a pgm to accept an array of names & name & check whether the name is present in the array. return the count of occurance. use following array as input; {"Dave","Ann","dev","merry"}
WHAT IS DIFFERENCE BETWEEN ART & VECTOR QUANTISATION BASED ON THEIR APPLICATION IN NEURAL NETWORK
what is a pointer in c language?
What is your Job Profile in IT feild.
what kind of questions generally asked for ME admission, (specially in RGPV).