Question: C++ language Instruction The following code has been written for you #include #include // you can supply the other includes needed here using namespace std;

C++ language Instruction The following code has been written for you #includeC++ language

Instruction The following code has been written for you #include #include // you can supply the other includes needed here using namespace std; int main()( string filename; cin>>filename; // input the file name Instruction Open the file and verify it opened. If it doesnt open output the message "file fail" and return a -1 to the operating system. Each record in the file contains a file type (l for international and D for domestic) and how many miles the flight is. You are to create two vectors one for international and one for domestic. Add the miles to the appropriate vector based on the flight type. For each vector total up the miles. After all records are processed output the how many flights there are for each of international and domestic and then putout the average miles for each. See the Instructor output for formatting Compile Code Test Code Save Work A correct answer will earn 20 out of 20 points. A wrong attempt will cost 0 points See Answer Grade This Part results no results vet 1 4 10 12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!