PEN AND PAPER FLOWCHART. Hand write the correct pseudocode using pen and paper. DEBUG03-03 // 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
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
PEN AND PAPER FLOWCHART. Hand write the correct pseudocode using pen and paper. DEBUG03-03
// 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 2 steps with 1 images