* Thus wrote Richard Baskett ([EMAIL PROTECTED]): > on 8/26/03 9:57 AM, Robert Cummings at [EMAIL PROTECTED] wrote: > > > This smells like a trick question... Are the switches connected to the > > same light bulb? You've only mentioned one light bulb? 8) > > > > Cheers, > > Rob. > > > > > > On Tue, 2003-08-26 at 12:35, Jay Blanchard wrote: > >> Also ask a couple of other questions that require thought, but have > >> nothing else to do with code. such as... > >> > >> In one room you have 3 light switches, each connected to one light bulb > >> in another room. How many trips must you make to determine which switch > >> is connected to which light bulb? > > Only one trip, and Im not sure if I should explain or let you guys figure it > out :)
toggle_light(1); sleep(120); toggle_light(1); toggle_light(2); move('self', 'room/'); if ($lightbulb['temp'] > $room['temp']) { echo "switch #1"; } elseif ($lightbulb['ison']) { echo "switch #2"; } else { echo "switch #3"; } hm.. i had to keep it OT somehow :) Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php