Pseudocode
for payroll example
Mainline
Housekeeping( )
Process( )
Wrapup( )
End
Mainline
Housekeeping
Open
I/O Files
Write page headers
End
Housekeeping
Process
Read input record
While NOT EOF
Loop
( )
End
loop
End
Process
Loop
If hours > 40
basePay = 40 * payHr
ovtPay = (hours - 40) *
1.5 * payHr
pay = basePay + ovtPay
else
pay = hours * payHr
end
if
set up line
write line
read input record
End
loop
Wrapup
Close files
End
Wrapup