Yes a better solution would be to use a 2D array and allow patrons to choose which seats instead on allocating them linearly.
Type: Posts; User: Junky
Yes a better solution would be to use a 2D array and allow patrons to choose which seats instead on allocating them linearly.
Both you and aesguitar suggested using an array which is overkill for this. You would need two loops one to fill the array and one to print it. If you can work out the logic of how to fill the array...
Why do you need an array?
What part of my simple algorithm above (which doesn't need an array) didn't you understand?
Use a single loop that iterates seats number of times. Inside have an if statement when counter reaches taken swap over to printing o's.