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.
Jump to Post
Congratulations. You have passed the 'I can cut and paste my homework question' test. Shame you will probably fail your class though, if you think others will do your work for you.
Especially as I note this was your second cut and paste in a matter of minutes - …
All 5 Replies
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.