AP Computer Science --- Haas --- SodaArray

Finding your soda

Objective: Using Arrays

A large number of college students are attending a party. Each guest is drinking a can of soda (since they are under 21). An emergency causes the lights to go out and the fire alarm to sound. The guests calmly put down their soda and exit the building. When the alarm goes off, they re-enter and try to retrieve their soda. However, the lights are still off, so each student randomly grabs a can. What are the chances that at least one student gets his or her original soda?