This pseudocode is intended to display // employee net pay values. All employees have a standard // $45 deduction from their checks. // If an employee does not earn enough to cover the deduction, // an error message is displayed. // This example is modularized. start Declarations string name string EOFNAME = ZZZZ while name not equal to EOFNAME housekeeping() endwhile while name not equal to EOFNAME mainLoop() endwhile while name not equal to EOFNAME finish() endwhile stop housekeeping() output "Enter first name or ", EOFNAME, " to quit " return
(DEBUG AND MAKE A FLOWCHART OF THIS PROGRAM)
// This pseudocode is intended to display
// employee net pay values. All employees have a standard
// $45 deduction from their checks.
// If an employee does not earn enough to cover the deduction,
// an error message is displayed.
// This example is modularized.
start
Declarations
string name
string EOFNAME = ZZZZ
while name not equal to EOFNAME
housekeeping()
endwhile
while name not equal to EOFNAME
mainLoop()
endwhile
while name not equal to EOFNAME
finish()
endwhile
stop
housekeeping()
output "Enter first name or ", EOFNAME, " to quit "
return
mainLoop()
Declarations
num hours
num rate
num DEDUCTION = 45
num net
output "Enter hours worked for ", name
input hours
output "Enter hourly rate for ", name
input rate
gross = hours * rate
net = gross - DEDUCTION
if net > 0 then
output "Net pay for ", name, " is ", net
else
output "Deductions not covered. Net is 0."
endif
output "Enter next name or ", EOFNAME, " to quit "
input name
return
finish()
output "End of job"
return
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 4 images