OK, well, you originally said:
Originally Posted by matinthehat
There are a couple of things to note about the way you put this problem. First, think about how the input relates to the logic of the program. If you have to continue a loop as long as there is input, I would think that input somehow controls the loop. If the input is a seat number, then you would check if the seat is available and give that person a seat if it is, or ask them where else they should sit. You have to do that until everyone has a place to sit.
I need to go through the array and only change one of the false elements to true each time, so if a false element is found and turned to true; the loop needs to stop and continue once more input is received.
Have fun coding that.
while there is input available:
check if there are seats available:
if not, break
ask for a seat
check if that seat is available
if it is, seat the person
if not, repeat