Problem writing a program in C

Discussion in 'Homework Help' started by kencool1, Mar 2, 2008.

Thread Status:
Not open for further replies.
  1. kencool1

    Thread Starter New Member

    Aug 22, 2007
    Dear all,
    I am learning C programming by myself using some books and notes from the internet.
    I have got stuck in writing a program as I don’t know where to start writing it...
    Can someone please help me by writing a program using C to implement the following airline reservation system.

    So far I have learnt if-else statements, switch staement, break statement, continue statement,
    Loop: while, do-while, for.
    Variable: global and local.
    I know also how to input and ouput (scanf, printf)

    If you will not be able to do the program, can you at least write the pseudocodes for me please.

    Can I have a reply from anyone as soon as possible...
    Thnx in advance.

    The program is as followed:

    A small airline that operates flights to one destination uses a computer system to:

    1) Provide an enquiry system regarding the number and type of seats available for a flight on a specified day.

    2) Issue a single ticket to a passenger containing the following information:

    a) Name of destination
    b) Types of seat booked, i.e., first or tourist class.
    c) Departure, arrival times and date
    d) Cost of ticket
    e) Name of passenger

    3) Output a passenger list for each flight.

    The following have to be assumed:
    1. There is only one flight per day at different times over a period of five days. The airline operates from Monday to Friday only. The duration of the flight is 2 hours.

    2. Every aeroplane used has a maximum of 50 seats, the distribution of first class seats to tourist class seats being 10 and 40 respectively.

    3. A seat is bookable up to one week in advance but not on the day of the flight.

    4. The cost of the first class seat is $500, whilst that of a tourist class seat is $250.
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    Please continue with the existing thread in the programmers area.
Thread Status:
Not open for further replies.