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 |
I have cleared SBT clerk exam and having interview on 29.I have completed my B.tech in IT.I would like to know the types of questions asked in the interview.
What is the difference betweem scrum model,xp model and fdd model?
if your monitor is not started with your cpu, but start when monitor attach to another cpu then where is the problem?
what is difference between Fault tolerance Vs fault avoidance
discus the worst and best case complexity of binary search
it consists of 4 panel 2 for computers and 2 for ECE. Here are the questions asked in c-dot for c.s 1. c language. sorting=merge and quick, pointers i.e abut link list insertion deletion ,interpreter vs compiler, preprocessor, macros, what is int, array ,linklist , pointer basic queston were asked. networking = DHCP,ARQ,RARQ,DIFF BETWEEN UDP AND TCP, IF U HAVE MADE ANY LAN CHAT AUR GTALK APPLICATION THEN WHAT IS IMPLEMENTED IN IT I MEAN TCP AUR UDP? DNS, AND THINGS RELATED TO UR PROJECT AUR TRAIING. OPERATING SYSTEM= DEFINATION, FUNCTION , BLOCKED PROCESS, AND ALSO PLZZ GO THROUGH DIFF SCHEDULING ALGO, VIRTUAL MEMORY. JAVA= IF U HAVE DONE COURSE IN JAVA THEN JUSTIFY HOW JAVA IS BETTER DEN C++. PLEASE DO COMPARE PROPERLY BCZ MANY FEATURE OF JAVA ARE ALSO DER IN C++ SO WHAT IS THE BASIC DIFF BETWEEN THEM... DATABASE= SIMPLE PL/SQL QUERRY SYTENX AND INNER JOIN OUTER JOIN SO JUST HAVE A LOOK THAT SIMPLY WHAT ARE THE SYNTAX.... FIRST YOU WULD BE ASKED TO INTRODUCE YOUSELF . SECOND WOULD BE ASKED ABUT YOUR FAV SUBJECT. SO THATS IT ALLL THE BEST............. AND GUYS EVERY ONE SHULD POST THE LIST OF QUESTION ASKED IN ANY COMPANY IN THE FORUM WHERE IN SUBJECT THE COMPANY NAME SHULD BE MENTIONED
What do u mean constructor in java ?
tcp/ip is ---bits
NIC question paper
i am studying mechanical third year.. i like to do one year marine bridge course.. my question is . is there good oppourtunites for us (mecanical eng)? and tell about the salary
write the output for yhe given program int a=5; void main() { int a=9; printf("%d",a); } printf("%d",&a);
describe how your code can determine if the user entered an input box value or click the cancel button?
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)