{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

airline - Airline Flight Cost Analysis#include...

Info icon This 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 " << number_of_seats << "): "; cin >> num_pass; cout << "Enter the distance (in miles) of the flight (maximum "
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern