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 |
what is the difference between physical address and logical address?
A,B and C can complete a piece of work in 10 days, then how many people are required to finish the whole work in 25 days? a) 10 days b) 15 days c) 20 days d) 22 days e) 25 days
briefly explain about your project? please tell me about this answer . my current project is ERP domain web based application.please please help me
What is the procedure for taking leave while detecting Epf and Esi?
explain various problem solving statagis
my pc frequently rebooted on normal windows xp mode, but didnot rebooted on safemode, its works no rebooting. what problem this, pls solution.
Hi,am being graduated as BE in MECHATRONICS engineering and now experienced work in mechanical stream for 1.5 years.If am trying for a job in mechatronics what are the fields do i need to be known well and is there any companys who requires a MECHATRONICS ENGINEER.
How we can read an Image in VC++?How we can find out the intensities of the pixels of an image and dimension of the image?
Is there aptitute question will be asked in NIC exam ??? If yes how many questions will be asked??
Explain the concept of segmentaion.
Guys! I coplted 10th with 80% and +2 with 64% now am dng c.s.e b.tech...i want to go abroad for higher studies i want to write tofel...plZ GIVE UR SUGGESTIONS!
how to connect oracle with java ? Give detail explanation.
Civil Engineering (5086)
Mechanical Engineering (4456)
Electrical Engineering (16639)
Electronics Communications (3918)
Chemical Engineering (1095)
Aeronautical Engineering (239)
Bio Engineering (96)
Metallurgy (361)
Industrial Engineering (259)
Instrumentation (3014)
Automobile Engineering (332)
Mechatronics Engineering (97)
Marine Engineering (124)
Power Plant Engineering (172)
Textile Engineering (575)
Production Engineering (25)
Satellite Systems Engineering (106)
Engineering AllOther (1379)