|
General Details
|
|
JavaScript
|
|
Posted 289 Days Ago
|
|
397 Views
|
|
Received 1 Rating
|
|
Locker Problem
Description
This is my solution to the locker problem. Basically, the problem is there are 1,000 students and 1,000 lockers. All lockers start out closed. Then, the first student will open every locker. Then, the second student will change the state of every other locker (such that a closed locker is opened and a open locker is closed). Then, the third student will change the state of every three lockers. The fourth student will change the state of every four lockers and so on. The solution is the number of lockers open after each student does what they are suppose to do.
Technical
Web browser
Source Code
Comments
| Please login to post comments. |
|
|
What the heck, confused me with all the lockers lmao.
@mikeMarek - it's just a practice fun kind of program... i remember writing loads of codes like that :-D the fun old days lol.
Kind regards,
Scott
|
|
|
Nice program but not very useful (unless this question is on your homework or something :P)
Kudos to you,
-Mike
|
More "JavaScript" Source Codes By This Author
Recently Posted "JavaScript" Source Codes
Recently Rated "JavaScript" Source Codes
|