Assignment:
Using arrays
You will create a program from scratch; a one-dimensional game of Lights Out. Briefly, the game consists of a row of lights that can be either on or off. By choosing a particular light, you switch its state and the state of its neighbors. That is, you turn the chosen light from off to on or from on to off, and you turn each neighbor from off to on or from on to off, depending on their initial states. The game is won when all of the lights are turned off.