diff options
| author | Joe Traver <[email protected]> | 2022-11-28 17:41:32 -0800 |
|---|---|---|
| committer | Joe Traver <[email protected]> | 2022-11-28 17:41:32 -0800 |
| commit | 3a900a6bbf7edd8f4db4621f9feac899002784f6 (patch) | |
| tree | 0f8cd52097d057dedf188712c6fb217aab585e1b /BlankConsoleLab | |
| parent | Added comments (diff) | |
| download | cst116-lab3-joetraver30-3a900a6bbf7edd8f4db4621f9feac899002784f6.tar.xz cst116-lab3-joetraver30-3a900a6bbf7edd8f4db4621f9feac899002784f6.zip | |
Psuedo code cleanup
Diffstat (limited to 'BlankConsoleLab')
| -rw-r--r-- | BlankConsoleLab/CST116_lab3_joetraver_pseudocode.txt (renamed from BlankConsoleLab/Pseudocode.txt) | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/BlankConsoleLab/Pseudocode.txt b/BlankConsoleLab/CST116_lab3_joetraver_pseudocode.txt index 20c821d..11adddc 100644 --- a/BlankConsoleLab/Pseudocode.txt +++ b/BlankConsoleLab/CST116_lab3_joetraver_pseudocode.txt @@ -21,6 +21,11 @@ Variables- dist array fare array toll array + total fare array + cost per mile array + average cost per person array + people transported + total paid record_counter main- @@ -36,6 +41,9 @@ main- nest loop (outfile is open) - WriteOutputFile() + PeopleTransported() + TotalPaid() + AvgCostPerPerson() PrintCalculatedData() out file close - @@ -99,7 +107,39 @@ WriteOutputData- dist [counter] fare [counter] toll [counter] + tfare [counter] + CPM [counter] +PeopleTransported- + + loop place holder variable to counter + total people = total people + psgr[place variable] + + print: + to command prompt: + Total people transported: pplt + to report: + Total people transported: pplt + +TotalPaid- + loop place holder variable to counter + paid = paid + tfare[place variable] + + print: + to command prompt: + Total fairs paid: $ paid + to report: + Total fairs paid: $ paid + +AvgCostPerPerson- + ACM = paid / pplt + + print: + to command prompt: + Average cost per person: $ ACM + to report: + Average cost per person: $ ACM + PrintTotalsandSummery- variables- |