diff options
| author | Birducken <[email protected]> | 2022-11-29 14:16:36 -0800 |
|---|---|---|
| committer | Birducken <[email protected]> | 2022-11-29 14:16:36 -0800 |
| commit | 76afbcff67b47f4d81b110b37ceb5c6d267fb804 (patch) | |
| tree | 9d1908d4826f5cce788a4c09ac3beb3ee7b5720e /BlankConsoleLab/cst116-lab3-stark-psuedo-code.txt | |
| parent | Finished. (diff) | |
| download | archived-cst116-lab3-stark-master.tar.xz archived-cst116-lab3-stark-master.zip | |
Diffstat (limited to 'BlankConsoleLab/cst116-lab3-stark-psuedo-code.txt')
| -rw-r--r-- | BlankConsoleLab/cst116-lab3-stark-psuedo-code.txt | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/BlankConsoleLab/cst116-lab3-stark-psuedo-code.txt b/BlankConsoleLab/cst116-lab3-stark-psuedo-code.txt deleted file mode 100644 index ca35e98..0000000 --- a/BlankConsoleLab/cst116-lab3-stark-psuedo-code.txt +++ /dev/null @@ -1,27 +0,0 @@ -Trenton Stark -CST 116 -Lab 3 Psuedo Code - -Initialize a 50 element array (fares) with all 0s -Initialize totalPass = 0 - -Prompt the user for a file name (fName) and open prompted file, if file can't be opened print warning and loop, - -Print header row for table -for each line in file: - Read line into variables pick, drop, pass, dist, fare, and toll - total = fare + toll - if dist = 0: - cosMi = 0 - else: - cosMi = fare / dist - - print row with pick, drop, pass, dist, fare, toll, total, and cosMi - - totalPass = totalPass + pass - store fare into corresponding element of fares[] array - -totalPaid = sum of all elements in fares[] -average = totalPaid / total pass - -Print totalPass, totalPaid, and average |