بسم الله الرحمن الرحيم
حبيت أبتدي في أول مشاركه لي بقوه نوعا ما .... فقررت أن اضع سؤال للتحدي وهو سؤال يستطيع كل من يعرف مقدمات هذه اللغه أن يحله (( طبعا لا أقصد بالتحدي إنه سؤال لا يستطيع حله إلا المتخصصين ، أعتقد أن الكل يستطيع ولكن يحتاج لقليل من التفكير))
(Airline Reservation System) A small airline has just purchased a computer for its new automated reservation system. The president has asked you to program the new system. You are to write a program to assign seats on each flight of the airline's only plane (capacity: 10 seats).
Your program shold display the following menu alternatives:
please type 1 for "first class"
please type 2 for "economy"
if the person type 1, then your program should assign a seat in the first class section (seat 1-5). if the person type 2, then your program should assign a seat in the economy class section (seat 6-10).Your program should then print a boarding pass indicating the person's seat number and whether it is in the first class or economy section of the plane.
use a single-subscripted array to represent the seating char of the plane. Initialize 0 to empty or 1 to indicate.
Your program should, of course, never assign a seat that has already been assigned. When the first class section is full, yuor program should ask the person if it is acceptable to be placed in the economy section (and vice versa). if yes, then make the appropriate seat assignment. if no, then print the message "Next flight leaves in 3 hours."
