Can you please help me solve this in C language? I did encounter and solve this problem with Java but I cannot seem to implement the use of structures in solving this problem. Help is appreciated, thank you.   Using the concept of structures, write a 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

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter9: Completing The Basics
Section: Chapter Questions
Problem 7PP
icon
Related questions
Question
100%

Can you please help me solve this in C language? I did encounter and solve this problem with Java but I cannot seem to implement the use of structures in solving this problem. Help is appreciated, thank you.

 

Using the concept of structures, write a 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 4 steps with 2 images

Blurred answer
Knowledge Booster
Reference Types in Function
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