I want to use an array that will tell me which doors are open at the end of an experiment. The experiment involves 100 students (who are numbered 1 through 100) and 100 doors (also numbered 1 through 100). All doors begin as closed, but become open when a student goes through. The students go through all doors that are multiples of their given number.
My first step would be to set up an array of 100 integers, but then how do I change their values of the array in multiples of the student's numbers?