|
Susie enters a hallway at school with 100 lockers numbered 1-100. She goes down the hallway and opens all of the lockers beginning with locker 1 and ending with locker 100. She goes down the hallway again beginning wth locker 1 and ending with locker 100- this time, for every locker that has a number that is a multiple of 2 she closes the locker. She is going down the hallway again beginning wiht locker 1 and ending with locker 100 - this time, for every locker that has a number that is a multiple of 3 she closes the locker if it is open and opens the locker if it is open and opens the locker if it is closed. She repeats this process again for multiples of 4, 5, 6... all the way up to 100.
Can someone help me code out this problem?
HELP!!!!!!!!
Last edited by sh9di : 02-06-2008 at 02:53 PM.
Reason: Forgot to add a few words
|