airline - / Airline Flight Cost Analysis #include...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// Airline Flight Cost Analysis / #include <iostream.h> // necessary for input/output #include <iomanip.h> // necessary for setprecision manipulator #include "apstring.h" // necessary for string object # // main function int main() { // Specifications for a Boeing 747-400 // Source: The World Almanac and Book of Facts 1995 apstring plane_name("Boeing 747-400"); int const plane_speed = 533; int const number_of_seats = 398; int const max_flight_length = 4331; int const cost_per_hour = 6939; int num_pass; // number of passengers on the plane float num_miles; // flight distance float avg_ticket_price; // average ticket price for flight float flight_cost; // cost for the flight float cost_per_pass; // cost per passenger float total_fares; // total fares collected for the flight float profit; // profit for the flight float hours; // length of flight in hours cout << "\nAIRLINE FLIGHT ANALYSIS\n"; cout << "Airplane name: " << plane_name << endl; cout << "Enter the number of passengers on the flight (maximum "
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/20/2011 for the course COMPUTER 12 taught by Professor Aymanboghdady during the Spring '11 term at American College of Computer & Information Sciences.

Ask a homework question - tutors are online