while (File) { search= FindFlight(flightNo, 20, flightnumb); if (search ==-1){ cout << "Invalid Flight Number" << endl; } else { if (type==2){ // cancel a flight if (seats > bookings [search]) cout << seats << " seats were not cancled from flight "<< flightnumb << " (excess of seats booked)"<< endl; else { bookings[search]-=seats; cout << seats << " seats subtracted from flight " << flightnumb << endl; } } else if (type==1){ // add a flight bookings[flightnumb]+=seats; cout << seats << " seats added to flight " << flightnumb << endl; } else cout << "Transaction Type Invalid" << endl; } File >> type >> flightnumb >> seats; }