Chapter 6: Problem 26
A theater seating chart is implemented as a table of ticket prices, like this: $$ \begin{array}{llllllllll} 10 & 10 & 10 & 10 & 10 & 10 & 10 & 10 & 10 & 10 \\ 10 & 10 & 10 & 10 & 10 & 10 & 10 & 10 & 10 & 10 \\ 10 & 10 & 10 & 10 & 10 & 10 & 10 & 10 & 10 & 10 \\ 10 & 10 & 20 & 20 & 20 & 20 & 20 & 20 & 10 & 10 \\ 10 & 10 & 20 & 20 & 20 & 20 & 20 & 20 & 10 & 10 \\ 10 & 10 & 20 & 20 & 20 & 20 & 20 & 20 & 10 & 10 \\ 20 & 20 & 30 & 30 & 40 & 40 & 30 & 30 & 20 & 20 \\ 20 & 30 & 30 & 40 & 50 & 50 & 40 & 30 & 30 & 20 \\ 30 & 40 & 50 & 50 & 50 & 50 & 50 & 50 & 40 & 30 \end{array} $$ Write a program that prompts users to pick cither a seat or a price, Mark sold seats by changing the price to 0 . When a user specifies a seat, make sure it is available. When a user specifies a price, find any scat with that price.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.