diff options
| -rw-r--r-- | BlankConsoleLab/CST116-Lab3-Havaldar.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/BlankConsoleLab/CST116-Lab3-Havaldar.cpp b/BlankConsoleLab/CST116-Lab3-Havaldar.cpp index b071752..dc4acf2 100644 --- a/BlankConsoleLab/CST116-Lab3-Havaldar.cpp +++ b/BlankConsoleLab/CST116-Lab3-Havaldar.cpp @@ -43,15 +43,15 @@ int main() //write the column headers cout << left; - cout << setw(20) << "Trip" - << setw(20) << "Pickup" - << setw(20) << "Dropoff" - << setw(20) << "#ppl" - << setw(20) << "Distance" - << setw(20) << "Fare" - << setw(20) << "Toll" - << setw(20) << "Total" - << setw(20) << "Cost/Mi" + cout << setw(10) << "Trip" + << setw(10) << "Pickup" + << setw(10) << "Dropoff" + << setw(10) << "#ppl" + << setw(10) << "Distance" + << setw(10) << "Fare" + << setw(10) << "Toll" + << setw(10) << "Total" + << setw(10) << "Cost/Mi" << endl; //within the opened file readin the columns as the followiung variables @@ -61,15 +61,15 @@ int main() //take price per mile for each row double cpm = total / dis; //output the elements in the file and the calculated vartiables - cout << setw(20) << count - << setw(20) << pick - << setw(20) << drop - << setw(20) << ppl - << setw(20) << dis - << setw(20) << fare - << setw(20) << toll - << setw(20) << total - << setw(20) << setprecision(3) << cpm << endl; + cout << setw(10) << count + << setw(10) << pick + << setw(10) << drop + << setw(10) << ppl + << setw(10) << dis + << setw(10) << fare + << setw(10) << toll + << setw(10) << total + << setw(10) << setprecision(3) << cpm << endl; //add to totals count++; |