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
Hi Guys, This is Rama, right now I am working as a Software Test Engineer in Gurgoan and I have over all 3 years of testing expoeriance. Right now I am looking for a change. Can any body help me out to find a job in south india. Thanks in Advance
Need guidewire related Documents(Interview Question/Tips/Best Practice/Dumps)
Do not use more than 3 nested IF. Use Evaluate statement in case of more IF required. Please give a detail explantion besides readability and clarity for Evaluate stmt.
How to create a new dataset only duplicate observations in proc sort procedure?
what is meant by life cycle of a business
What is the difference between DECISION COVERAGE(DC) and MODIFIED CONDITION/DECISION COVERAGE(MCDC)?
Delta 5 weight scale not connect with oracle application what i can do?
Plz sent me in .net 2.0 interview Question & answers?
Have you used callsymputx? what points need to be kept in mind when using it?
in cobol,wat is the difference in using 'set index in occurs clause' ....and 'occurs depending-on clause'
What are the tasks performed by a Team Lead
Write a pascal program to calculate the sum of the first 100 even number and odd number
What do you understand by modular programming?
kindly send interview materials
Write a program to create a process in UNIX