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 defaultly populate charges in Clear transactions window for Cash Management?
How EVA granules manufactured (I wanted to know the manufacturing process). (Virgin Granules) and what are the Raw Materials used.
List three things you can do with the files you create by recording your voice on your computer
Bird is flying 120 km/hr between B to R. Two trains at B to R at 60 kmph. The distance traveled by the bird before it is killed?
Why is using C language
Please if anybody have Vizag Steel Entrance exam papers or atleast Pattern of exam.Then please forward to my email- id: :srikanth.avanthi@gmail.com
what is dbms and rdbms??
There are prime factors of two numbers a and b , write a program using this prime factors whether a is divisible by b?
what is program data insulation in dbms?
I want to join for load runner training..please suggest me which is the best institute for load runner training in bangalore?
which type of casting enforces type safety
Write a program to maintain a singly linked list having the following functions: a) Creation of the list b) Displaying the list. c) Swap all nodes at consecutive even odd positions. E.g.: The nodes at position 1 should be swapped with node 2, node 3 with node 4 and so on.
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)