A small company needs an interactive program to compute an employee’s paycheck. The payroll clerk will initially input the data, and given the input data, an employee's wage for the week should be displayed on the screen for the payroll check. The data for the employee includes the employee's hourly pay rate and the number of hours worked that week. Wage is equal to the employee's pay rate times the number of hours worked (up to 40 hours). If the employee worked more than 40 hours, wage is equal to the employee's pay rate times 40 hours plus 1½ times the employee's pay rate times the number of hours worked above 40. Instruction: Rank the given pseudocodes according to their order of action: If employee’s number of hours worked is less than 0, go to 5 Set employee’s hourly pay rate to 0 Set employee’s number of hours worked to 0 Print “Employee’s wage is ”, employee’s wage Else, employee’s wage = employee’s hourly pay rate x hours Else, go to 5 Else, go to 8 Get employee’s hourly pay rate Get employee’s number of hours worked Check for negative work hours Compute for the employee’s wage If employee’s hourly pay rate is less than 0, go to 2 If the employee’s number of hours worked is greater than 40, employee’s wage = (employee’s hourly pay rate x 40) + (1.5 x employee’s hourly pay rate x (hours worked – 40)) worked Check for negative pay rate Print “Enter employee’s pay rate: ” Print “Enter the employee’s number of hours worked: ”
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:
A small company needs an interactive
The data for the employee includes the employee's hourly pay rate and the number of hours worked that week. Wage is equal to the employee's pay rate times the number of hours worked (up to 40 hours). If the employee worked more than 40 hours, wage is equal to the employee's pay rate times 40 hours plus 1½ times the employee's pay rate times the number of hours worked above 40.
Instruction: Rank the given pseudocodes according to their order of action:
- If employee’s number of hours worked is less than 0, go to 5
- Set employee’s hourly pay rate to 0
- Set employee’s number of hours worked to 0
- Print “Employee’s wage is ”, employee’s wage
- Else, employee’s wage = employee’s hourly pay rate x hours
- Else, go to 5
- Else, go to 8
- Get employee’s hourly pay rate
- Get employee’s number of hours worked
- Check for negative work hours
- Compute for the employee’s wage
- If employee’s hourly pay rate is less than 0, go to 2
- If the employee’s number of hours worked is greater than 40, employee’s wage = (employee’s hourly pay rate x 40) + (1.5 x employee’s hourly pay rate x (hours worked – 40)) worked
- Check for negative pay rate
- Print “Enter employee’s pay rate: ”
- Print “Enter the employee’s number of hours worked: ”
Step by step
Solved in 2 steps