There is a room with 1000 light switches, numbered 1, 2, 3,
4, ... 1000, all turned off.
Outside the room there are 1000 men, numbered man1, man2,
...man 1000
In order, each man walks into the room and changes the
position of each switch that is a multiple of his number.
That is: man1 flips every switch
man2 flips switches 2, 4, 6, 8 ....1000
man3 flips switches 3, 6, 9, ..... 999
.....
Man 1000 flips switch 1000
After all 1000 men are done, how many switches are on?

Answer Posted / orenise

The above code does not work, Please ignore it. I will Post
the answer, when i got the correct Code.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi All, Can any one please send me the difference between informatica 7i and 8i versions, Thanks in advance. vinod

1547


i am getting the error while compiling my cics program with including db2 dclgen member it is showing that ur dclgen member not including and all the host variables are undeclared

1103


what is dot net framework

2354


Hi all... I had completed MSC(Computer) and had join the construction company based on sap.they want me to work on abap.but software company is totally different from construction company and they want me 2 grasp it as fast i can.i am finding it difficult.what should i do??????

1411


Given a cube of size n*n*n (i.e made up of n^3 smaller cubes), find the number of smaller cubes on the surface. Extend this to k-dimension.

686






how to stop execution of step 3 in a job mainframe

1726


what is the filters in biztakk server? where it can use?

1664


how will you code the subfile which is in editing mode (multiple case subfile)?

1608


what is the diffrence between software and hardware language?

1843


For a binary tree with n nodes, How many nodes are there which has got both a parent and a child?

3207


what are the activities you enjoy most and How do you see these Developing in the Future with Reference to in your work life and in your personal life

1045


10.Define filters,binary to hexadecimal,hexadecimal to decimal?

1526


What is the meaning of client-server application. The purpose of Client-Server Application. with description.

1671


what is the similarity between networking devices?

1684


what is difference between object oriented programming structure and object oriented programming system?

1456