// Call the function printBookings (to print the current status - // all flights have 0 bookings. printBookings(bookings, 10); input >> trans_type >> flight_num >> seats; while(!input.eof()) { //debug cout << trans_type << " " << flight_num << " " << seats; if (trans_type == BOOK_FLIGHT) { // book flight bookings[flight_num]+=seats; log << seats << " added to flight #" << flight_num << "." << endl; } else if (trans_type == CANCEL_FLIGHT) { // cancel flight if (bookings[flight_num] < seats) { log << "ERROR: Cannot cancel " << seats << " in flight #" << flight_num<<" when flight #"<> trans_type >> flight_num >> seats; } // Call the function printBookings printBookings(bookings, 10); Income(bookings, 10, 120); }