C PROGRAMMING Using the concept of structures in C programming, write a C program to assign passenger seats in an airplane. Assume a small airplane with seats numbered as follows: 1 A B C D 2 A B C D 3 A B C D 4 A B C D 5 A B C D The program should display the seat pattern, marking with an ‘X’ the seats already assigned. For example, after seats 1A, 2B, and 4C are taken, the display should look like: 1 X B C D 2 A X C D 3 A B C D 4 A B X D 5 A B C D Seats are assigned by specifying a number and a letter. If the user types in a seat that is already assigned, the program should say that the seat is occupied and ask for another choice. The program should run until all seats are filled, or the user signals that the program should end.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter13: Structures
Section: Chapter Questions
Problem 3PP
icon
Related questions
Question

C PROGRAMMING

Using the concept of structures in C programming, write a C program to assign passenger seats in an airplane. Assume a small airplane with seats numbered as follows:

1 A B C D
2 A B C D
3 A B C D
4 A B C D
5 A B C D


The program should display the seat pattern, marking with an ‘X’ the seats already assigned. For example, after seats 1A, 2B, and 4C are taken, the display should look like:

1 X B C D
2 A X C D
3 A B C D
4 A B X D
5 A B C D


Seats are assigned by specifying a number and a letter. If the user types in a seat that is already assigned, the program should say that the seat is occupied and ask for another choice. The program should run until all seats are filled, or the user signals that the program should end.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Header Files
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage