diff options
| author | Abdullah Havaldar <[email protected]> | 2022-11-29 17:50:06 -0800 |
|---|---|---|
| committer | Abdullah Havaldar <[email protected]> | 2022-11-29 17:50:06 -0800 |
| commit | 47abf74190e1b9f9e0193abb37155d9c1dbd81c7 (patch) | |
| tree | e7d3124f8d4b7163b964e5e4c8746e5556b671f0 | |
| parent | removed useless variable (diff) | |
| download | cst116-lab3-abd00l4h-47abf74190e1b9f9e0193abb37155d9c1dbd81c7.tar.xz cst116-lab3-abd00l4h-47abf74190e1b9f9e0193abb37155d9c1dbd81c7.zip | |
main comments
| -rw-r--r-- | BlankConsoleLab/CST116-Lab3-Havaldar.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/BlankConsoleLab/CST116-Lab3-Havaldar.cpp b/BlankConsoleLab/CST116-Lab3-Havaldar.cpp index f9ad6e8..a9d3c97 100644 --- a/BlankConsoleLab/CST116-Lab3-Havaldar.cpp +++ b/BlankConsoleLab/CST116-Lab3-Havaldar.cpp @@ -17,8 +17,10 @@ using std::endl; int main() { + //initializing filename to ask user string fileName; + //ask user for the filename and store file name cout << "Please enter the input file name including extension: "; cin >> fileName; @@ -70,8 +72,8 @@ int main() cout << " " << endl; cout << " " << endl; cout << " " << endl; - cout << setw(20) << "** Avg Cost Per Person: " << avg << " **" << endl; - cout << setw(20) << "** People Transported: " << totalPpl << " **" << endl; - cout << setw(20) << "** Total Cost: " << setprecision(7) << totalCost << " **" << endl; + cout << "** Avg Cost Per Person: " << avg << " **" << endl; + cout << "** People Transported: " << totalPpl << " **" << endl; + cout << "** Total Paid: " << setprecision(7) << totalCost << " **" << endl; } |