An auto dealership has 50 cars and 50 customers who all show up simultaneously when the dealership opens.. All cars are off when the dealership doors open. As the customers enter, the first customer, denoted C1, starts every car. Then the second customer, C2, beginning with the second car, denoted Car 2, turns off every second car (Car 2, Car 4, Car 6, etc). Customer C3 begins with the third car Car 3 and changes every third car (starts it if it was stopped, and stops it if it was started). Customer C4 begins with Car 4 and changes every fourth car. Customer C5 starts with Car 5 and changes every fifth car, and so on, until customer C50 changes Car 50.
happygeek 2,411 Most Valuable Poster Team Colleague Featured Poster
stultuske commented: Hear ye! Hear ye! +14
Reverend Jim 5,179 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
AssertNull 1,094 Practically a Posting Shark
Reverend Jim 5,179 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
AssertNull 1,094 Practically a Posting Shark
Reverend Jim commented: And I had a few professors who barely had even one personality. +14
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.