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 |
hello everyone, one thing thats giving me a headache..hope u guys will help me out.i recently gave my gre and got extremely low marks. my gre score is 980 , enginnering aggregate is 58% , diploma aggregate is 73% , 10th score is 79%.so d big question is , is der any possibility of getting admission in any average US university ? am in a turmoil, Please help me out.Thanks in advance
model question papers of GrayOrange company
Hi I am Krushna.I have already applied for PO post in Syndicate Bank.Can anybody send me the sample paper for Syndicate bank PO.
What type of questions are asked in interview?
write a program to accept 25 characters and at the end display the largest and smallest among them.
2. How can we calculate the space for a file in jcl
T is a tree and V is a vertex of T of maximum degree in T, say the degree of V in n. Prove that T has atleast n vertices of degree 1.
what are the main points to be included in our introduction when asked in hr...??
Briefly describe an experience of yours that illustrates your ability to clearly articulate and explain technical issues in a nontechnical manner
Write a regular expression for "Capgemini Services Pvt.Ltd"
I am helping a friend to design a concert hall. No need for super architectural show off. Just a rectangular box. Knowing that in my country constructions are done with reinforced concrete and concrete blocks and that the hall's dimensions are, length: 75 meters, width: 32m height: 9m, and that there should not be any columns inside, what would be the size of the columns, beams and roof slab ?
can i get some win vista notes
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)