Question: (C language) Write a program for an airline. Your program should ask for 1 for PrimeFly or 2 for EcoFly. If the user enters 1,

(C language)

Write a program for an airline. Your program should ask for "1 for PrimeFly" or "2 for EcoFly". If the user enters 1, then assign a seat from (1-5) , if the user enters 2 assign a seat from (6-10) Then print a boarding pass showing the user's seat number and which type of fly.(PrimeFly or EcoFly) Use an array to represent the seating chart of the plane. Initialize the array with all seats are empty. As each is assigned, assignt the corresponding element of the array to 1 to show that no longer seat is available. Your program should never assign a seat that has already assigned.When the PrimeFly is full, then ask user to choose from EcoFly. If yes, assign a seat, if no then print the "See you next flight."

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!