I am not really familiar with arrays |
Please learn to use code tags, they make reading and commenting on source code MUCH easier. How to use code tags: http://www.cplusplus.com/articles/jEywvCM9/ There are other tags available. How to use tags: http://www.cplusplus.com/articles/z13hAqkS/ HINT: you can edit your post and add code tags. Some formatting & indentation would not hurt either |
subscript 0 1 2 3 4 5 +---+---+---+---+---+---+ array | 0 | 1 | 0 | 1 | 1 | 1 | +---+---+---+---+---+---+ +---+---+---+---+---+---+ new | ? | ? | ? | ? | ? | ? | +---+---+---+---+---+---+ |
I need to make a program which would identify which lights are going to work and which ones won’t after k (1<=k<=100) nights and find which day there was the most and least working lights. If there are numerous of nights with most and least working lights we need to find the night which number is the smallest. |