diff options
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 |