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

Q.N.1: DIFFERENCE BETWEEN HUB AND SWITCH? Q.N.2: DIFFERENCE BETWEEN WINNT 4.0SVR & WINDOW2000/2003SVR? Q.N.3: WHAT IS ACTIVE DIRECTORY AND WHAT ARE BENEFITS? Q.N.4: NAME ANY TWO NAME RESOLUTION NETWORK SERVICE? Q.N.5: NAME PRINT SERVICE? Q.N.6: NAME WINDOWS INSTALLER SERVICE? Q.N.7: NAME THE SERVICE RESPONSIBLE FOR MAKING NETWROK BROWSING LIST? Q.N.8: DIFFRENCE BETWEEN IP VERSION 4.0 AND VERSION 6.0? Q.N.9: DIFFRENCE BETWEEN TCP AND UDP PROTOCOL? Q.N.10: WRITE DOWN THE DEFAULT SUBNET MASK OF i. 191.168.0.20 ii. 172.16.0.2 iii. 201.15.16.1 Q.N.11: BENEFITS OF DOING SUBNETTING IN NETWORK? Q.N.12: DEFINE THE FOLLOWING TERMS:  SINGLE COLLISION DOMAIN AND MULTIPLE COLLISION DOMAINS.  SINGLE BROADCAST DOMAIN. Q.N.13: WHAT IS DNS? ROLE OF DNS SERVER IN ACTIVE DIRECTORY? Q.N.14: DIFFERENCE BETWEEN  DNS AND DDNS  IXFR AND AXFR  WIN2000 DNS AND WIN 2003 DNS Q.N.15: WHAT DO YOU MEAN BY GC SERVER? FUNCTION OF G.C SERVER IN ACTIVE DIRECTORY? Q.N.16: NAME THE PROTOCOL AND SERVICE USED IN INTRASITE REPLICATION OF AD DATABASE? Q.N.17: WHEN DO WE NEED TO CREATE DIFFERENT SITES IN ACTIVE DIRECTORY? Q.N.18: WRITE DOWN THE PORT NUMBERS (TCP/UDP)  LDAP(LIGHT WEIGHT DIRECTORY ACCESS PROTOCOL)  DNS (DOMAIN NAME SERVICE)  DHCP (DHYNAMIC HOST CONFIGURATION PROTOCOL)  SMTP (SIMPLE MAIL TRANSFER PROTOCOL)  HTTPS (HYPER TEXT TRANSFER PROTOCOL SERVER)  WINS (WINDOWS INTERNET NAME SERVICE)  KERBEROS  TELNET (TERMINAL EMULATION PROGRAM)  FTP (FILE TRANSFER PROTOCOL)  TFTP (TRIVIAL FILE TRANSFER PROTOCOL)  IP (INTERNET PROTOCOL)  ICMP (INTERNET CONTROL MESSAGE PROTOCOL)  TCP (TRANMISSION CONTROL PROTOCOL)  UDP (USER DATAGRAM PROTOCOL)  RDP (REMOTE DESKTOP PROTOCOL) Q.N.19: CORE COMPONENTS OF MICROSOFT EXCHANGE SERVER 2003? Q.N.20: DEFINE ROUTING AND ADMINISTRATIVE GROUP IN MICROSOFT EXCHANGE SERVER? Q.N.21: DIFFERENCE BETWEEN POP3 AND IMAP4 PROTOCOL? Q.N.22: DIFFERENCE BETWEEN EXCHANGE 5.5 AND EXCHANGE SERVER 2000/2003? Q.N.23: DIFFERENCE BETWEEN FAT AND NTFS? Q.N.24: MAX.NO. OF PARTITIONS IN WINDOWS 2000/XP? Q.N.25: WRITE THE COMMANDS:-  TO DISPLAY ARP CACHE TABLE  TO DISPLAY RESOLVER CACHE TABLE  TO DISPLAY NETBIOS CACHE TABLE  TO TRACE ROUTE  TO DISPLAY PORT STATUS  DNS TROUBLESHOOTING COMMAND  TO DISPLAY EFFECTIVE GROUP POLICY  TO KNOW FSMO ROLES AND USER’S SID  TO VERIFY REPLICATION STATUS OF ACTIVE DIRECTORY DATABASE  TO START AND STOP A PARTICULAR SERVICE Q.N.26: NAME THE ACTIVE DIRECTORY PARTITION? Q.N.27: WHAT DO YOU MEAN BY SINGLE AND MULTIMASTER REPLICATION? STATE ALL FSMO ROLES AND THEIR FUNCTION? Q.N.28: WHAT IS SYSTEM STATE DATA BACKUP? HOW TO RESTORE? Q.N.29: DIFFENIATEBETWEENAUTHORITATIVE AND NON-AUTHORITATIVE RESTORE OF SYSTEM STATE DATA? Q.N.30: DIFFERENCEBETWEEN INCREMENTAL & DIFFERENTIAL BACKUP? Q.N.31: WHAT IS THE BENEFIT OF VSC (VOLUME SHADOW COPY) IN WIN2003SERVER? Q.N.32: DEFINE THE TERM POOLING & SPOOLING IN RESPECT OF PRINTER? Q.N.33: WHICH AUTHENTICATION PROTOCOL IS USED IN WIN2000 /WIN2003 DOMAIN (NATIVE)? Q.N.34: BENFITS OF VPN? DIFFERENCE BETWEEN L2TP AND PPTP PROTOCOL? Q.N.35: DIFFERENCE BETWEEN SECURITY AND DISTRIBUTION GROUP? WHAT DO YOU UNDERSTAND BY GROUP NESTING? Q.N.36: DIFFERENCE BETWEEN OUTLOOK EXPREES AND MICROSOFT OUTLOOK? Q.N.37: WHAT IS THE MAX.LENGTH OF UTP CAT 5 SEGMENT? WHAT IS THE STANDARD COLOR CODING? Q.N.38: FUNCTION OF POINT TO POINT (PPP) PROTOCOL IN WAN CONNECTION? Q.N.39: BASIC DIFFERENCE BETWEEN ISDN AND PSTN LINE? Q.N.40: WHAT DO YOU UNDERSTAND BY COMPACTING NTDS.DIT? WHAT IS THE WAY TO DO THAT?

2 Answers   HCL,


give me a example of an application of Low severity & high priority.

0 Answers   DataCore, DCPL,


what are the reseach done by itc brfore launching e-copal

0 Answers  


Sorting is not possible by using which of the following methods? (Insertion, Selection, Exchange, Deletion)

2 Answers  


why is the scheduling decision needs to be taken when a process switches from running to waiting state.also,if this is because the next process is to be allocated to cpu then why not a scheduling decision taken when a process switches from ready to running state.

0 Answers  






what is the difference between composite key and primary key in sap abap

0 Answers   Cap Gemini,


what is the difference between oracle 8i vs 9i

0 Answers  


MY QUERY IS REGARDING AS/400. I AM FACING A PROBLEM IN UPDATING A PF COZ IT IS GETTING LOCKED SO I USED CHAIN(N) INSTEAD OF ONLY CHAIN.I ALSO TRIED UPDATE(E) ALONG WITH CHAIN(N),ITS NOT GIVING ANY ERROR BUT AT THE SAME TIME NOT UPDATING THE PF

0 Answers   Accenture,


Explain what is meant by repetition of information and inability to represent information. Explain why each of these properties may indicate a bad relational database design.

1 Answers  


WAP in Java to print the format: ABC BCD CDE EFG

0 Answers  


my pc frequently rebooted on normal windows xp mode, but didnot rebooted on safemode, its works no rebooting. what problem this, pls solution.

2 Answers  


WHO IS STAR....?

1 Answers   TCS,


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)