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 |
How to score well in examination of MCA(engg) december 2012? please reply soon........
What is Campus selection process of patni at Adcet,Ashta at 24th dec 2010.Also give apti syllabus.
write a c programme to count the characters words and lines in a text book
My gre score is 283 and ielts is 5.5, will i get i20 for this score
Why did they used to make the mill chimneys so tall?
Name all parameters for virtual private networks. what are different metrics of virtual private networks
nohup sort employees > list 2 > error out & what will happen?
what is isolator
What is smoke testing?
is there eligible for computer science engg students to write exams and how much percentage we want to attempt exam based on degree
how do we calculate physical address if logical address is given in the question?
write a c++ program to interchange two-integer number without using the third variable. use concept of constructor overloading.
Civil Engineering (5086)
Mechanical Engineering (4453)
Electrical Engineering (16638)
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)