From 8d27bacd7ddc53c8c097926bae64437d71f4f760 Mon Sep 17 00:00:00 2001 From: Abdullah Havaldar Date: Tue, 29 Nov 2022 17:52:37 -0800 Subject: inside comments --- BlankConsoleLab/CST116-Lab3-Havaldar.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BlankConsoleLab/CST116-Lab3-Havaldar.cpp b/BlankConsoleLab/CST116-Lab3-Havaldar.cpp index 3eb39a5..a43f352 100644 --- a/BlankConsoleLab/CST116-Lab3-Havaldar.cpp +++ b/BlankConsoleLab/CST116-Lab3-Havaldar.cpp @@ -54,8 +54,11 @@ int main() << setw(20) << "Cost/Mi" << endl; + //within the opened file readin the columns as the followiung variables while (theFile >> pick >> drop >> ppl >> dis >> fare >> toll) { + //take total for each row double total = fare + toll; + //take price per mile for each row double cpm = total / dis; cout << setw(20) << count << setw(20) << pick -- cgit v1.2.3