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
design a counter with the following repeated binary sequence: 0, 1, 2, 3, 4, 5, 6, 7, 8 using JK Flip Flop.
what is radio button? Plz show code this! how will select radio buttons to go next window Forms? Supose o radio button1 o radio button2 o radio button3 o radio button4 how will coding this? Plz explain this!
what are other resources are needed for this mantis?
Which design patterns have you used?
Definition of Singleton Class? what is the Purpose of it? what is the advantage?
Difference between views and index in sas programming
What is the difference between COM and CORBA?
5. Which of the following can you do with DB2 Express- C? Query databases with SQL Query databases with XML using XQuery and XPath Use SQL in Xquery and Xquery in SQL All of the above
how to convert hashmap to arraylist with iteration
How to change the color of a cell or a row in a datagrid on mouse hover using javascript/.net
Suppose server object is not loaded into the memory, and the client request for it , what will happen?
can u send some model papers how computer awareness questions are asked in goverment jobs(oriental insurance)to my mail id me.priyankapadma@rediff.com
please any one pass file aid,xpeditor and endeavor tools
what is the similarity between networking devices?
How to call dll API sub routine in VB Form.