blob: 834190791a7d9e9547dfd3197006c265dad165ea (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
Directive-
Read input data file and conduct calculations on the data
Functions-
ReadData
TotalFare(new array)
CostPerMile(new array)
PeopleTransported
TotalPaid
AvgCostPerPerson
WriteOutputFile
PrintCalculatedData
Variables-
MAX (array size definition)
pick array
drop array
psgr array
dist array
fare array
toll array
record_counter
main-
open report file to generate write file
open data file @ location
loop (in file is open)
- record_counter = ReadData()
infile close -
nest loop (outfile is open)
- WriteOutputFile()
PrintCalculatedData()
out file close -
- Error message -
- Error message -
ReadData-
variables-
pick array
drop array
psgr array
dist array
fare array
toll array
counter
infile prime read including counter var
loop (to infile end)
print:
pick [counter]
drop [counter]
psgr [counter]
dist [counter]
fare [counter]
toll [counter]
counter + 1
infile:
pick [counter]
drop [counter]
psgr [counter]
dist [counter]
fare [counter]
toll [counter]
WriteOutputData-
variables-
pick array
drop array
psgr array
dist array
fare array
toll array
coutner
i
print to outfile:
"Here is the output file"
loop (i = 0; i <= counter -1; i + 1)
outfile:
pick [counter]
drop [counter]
psgr [counter]
dist [counter]
fare [counter]
toll [counter]
PrintCalculatedData-
variables-
total_records
print:
"Total Records " total_records
print to report:
"Total Records " total_records
|