When a user specifies a price find any seat with that


A theater-seating chart is implemented as a two-dimensional array of ticket prices, like this:

ROW 6: 10 10 10 10 10 10 10 10 10 10
ROW 5: 10 10 10 20 20 20 20 10 10 10
ROW 4: 20 20 20 20 20 20 20 20 20 20
ROW 3: 20 20 30 30 30 30 30 30 20 20
ROW 2: 30 30 30 40 40 40 40 30 30 20
ROW 1: 40 40 50 50 50 50 50 40 40 40

Basic Implementation Write a program to:

1. Define a 6 * 10 two-dimensional integer array.

2. Fill the array with the predefined prices as shown above.

3. Prompt user to pick either a specific seat or a price.

4. When a user picks to choose by seat, ask for the preferred rows and seat number (eg. row:1, seat :1), make sure it is available and give a feedback on the price and mark the seat as "SOLD"

5. When a user specifies a price, find any seat with that price and give feedback on the seat row and number and mark the seat as "SOLD"

6. Mark sold seats by changing the price to 0.

7. Repeat the process until the user exits the program.

8. Write the pseudo code for the main program logic.

Solution Preview :

Prepared by a verified Expert
Programming Languages: When a user specifies a price find any seat with that
Reference No:- TGS01723635

Now Priced at $40 (50% Discount)

Recommended (93%)

Rated (4.5/5)