From 468dba775d54dee887695d4a49aa899961dac35c Mon Sep 17 00:00:00 2001 From: WilliamBishopCST116 <114703314+WilliamBishopCST116@users.noreply.github.com> Date: Mon, 28 Nov 2022 13:16:47 -0800 Subject: Update CST116-Lab3-Pseudocode- Bishop.txt --- CST116-Lab3-Pseudocode- Bishop.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CST116-Lab3-Pseudocode- Bishop.txt b/CST116-Lab3-Pseudocode- Bishop.txt index 06ac5cb..bcb9ebd 100644 --- a/CST116-Lab3-Pseudocode- Bishop.txt +++ b/CST116-Lab3-Pseudocode- Bishop.txt @@ -55,15 +55,15 @@ int totals(int totalpeople) Here we have our function that we have with the inf double totalfare1[] = { 84, 15, 12, 13 }; Here we have the array again of total fares totalpeople = 15; - cout << totalfare1 << endl; Here we print out the arrary of total fares + cout << totalfare1 <<"is total fares"<< endl; Here we print out the arrary of total fares int totalpaid = 0; for (int i = 0; i < 4; i++) { totalpaid = totalpaid + totalfare1[i]; Here we loop around the array and get the total paid variable. } - cout << totalpaid << endl; + cout << totalpaid <<"is total paid"<< endl; float avgcostperperson; avgcostperperson = totalpaid / totalpeople; Here we are printing out the variables of total cost and paid and the total fares to the screen - cout << avgcostperperson; Here we are printing out the rest of our information + cout << avgcostperperson<<"is average cost per person."; Here we are printing out the rest of our information ofstream file_("totals.txt"); inFile.open("totals.txt"); if (file_.is_open()) { -- cgit v1.2.3