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.



An integer number is said to be a perfect number if its factors, including 1 but not the number its..

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

Post New Answer

More Engineering AllOther Interview Questions

What's the range of C/A?

2 Answers   Ericsson,


Explain the following program segment. f(){ int *b; *b=2; }

0 Answers   Geometric Software,


How we calculate steam turbine governor linkage assembly?

0 Answers   Ispat,


SQL How can make delete and insert in one query

0 Answers  


What is IPSec?

0 Answers   HCL,






What is Thermal impedance?

1 Answers  


How to Define the defect density?

0 Answers   CFCI,


hi i have selected for nda and could please send me the courses offered in nda regarding engineering and all other courses????

0 Answers  


performance test required for a automatic bank teller?

0 Answers  


THERE iS ANY DEFAULT CONNECTION STRING FOR WINDOWS APPLICATION IN VB.NET2005 FROM WHICH AFTER CHANGING PROJECT DIRECTORY TO OTHER PLACE AND WE DID NOT CHANGE DATABASE PATH INB SQL CONNECTION ?????

0 Answers  


I have got one problem .I initially have got windows vista in my computer but now I installed linux UBUNTU operating system into my computer .For this i first format D: drive and got installed finely there and restart , when it boots there there were two options vista and ubuntu .But the problem is that when i choose vista it opens but screen seems to be dark only mouse pointer sees in the screen and no more windows appeared . But when i choose ubuntu it opens and asks for username and password .But i don't know these things. But linux is freeopen software , why it asks userename and password ? Now i am unable to use my computer ,i installed lunux without partioning the drive. Plz give me the solution The computer configuration of my computer is 80 GB harddisk, 1 GB RAM.3GHz speed.

0 Answers  


Explain work?

0 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4451)
  • Electrical Engineering Interview Questions Electrical Engineering (16632)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)