diff options
| author | Anibal LopezBonilla <[email protected]> | 2022-11-30 21:25:40 -0800 |
|---|---|---|
| committer | Anibal LopezBonilla <[email protected]> | 2022-11-30 21:25:40 -0800 |
| commit | 0cdb0af7491272cbe0de5243dfea50584628520a (patch) | |
| tree | aee2ae684ba70c051c5b292d85e7ece54499dfad /BlankConsoleLab | |
| parent | Push 3 (diff) | |
| download | archived-cst116-lab3-lopez-bonilla-0cdb0af7491272cbe0de5243dfea50584628520a.tar.xz archived-cst116-lab3-lopez-bonilla-0cdb0af7491272cbe0de5243dfea50584628520a.zip | |
Push 4
Diffstat (limited to 'BlankConsoleLab')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 4 | ||||
| -rw-r--r-- | BlankConsoleLab/Lab3_OutputTest.txt | 5 |
2 files changed, 2 insertions, 7 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 3f3260d..275786c 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -33,6 +33,7 @@ int main() { record_counter = ReadData(inFile, pick, drop, psgr, dist, fare, toll); + inFile.close(); if (outFile.is_open()) { @@ -119,11 +120,10 @@ void WriteOutputFile(ofstream& outFile, int pick[], int drop[], int void PrintTotalsAndSummary(ofstream& outFile, int pick[], int drop[], int psgr[], float dist[], float fare[], float toll[] , float TF[]) { - // To screen cout << "Total People Transported: " << endl - << "Total Paid: " << endl //TFare = fare + toll + << "Total Paid: " << TF[] << endl //TFare = fare + toll << "Average Cost Per Person " << endl; //Cost Per Mile = Fare / Distance // To file outFile << "\n\n\t** Total People Transported: " << endl diff --git a/BlankConsoleLab/Lab3_OutputTest.txt b/BlankConsoleLab/Lab3_OutputTest.txt index 6fffa96..599b88d 100644 --- a/BlankConsoleLab/Lab3_OutputTest.txt +++ b/BlankConsoleLab/Lab3_OutputTest.txt @@ -5,8 +5,3 @@ Trip# Pass# Dist. Fare Toll Total Cost 150 61 2 6.75 23 0 112 17 1 3.84 15 0 80 112 6 1.64 9.5 0 - - - ** Total People Transported: -Total Paid: -Average Cost Per Person |