The algorithm shown in Figure 1-14 should calculate and print the gross pay for five workers; however,

Question:

The algorithm shown in Figure 1-14 should calculate and print the gross pay for five workers; however, some of the instructions are missing from the algorithm. Complete the algorithm. If an employee works more than 40 hours, he or she should receive time and one-half of his or her pay rate for the hours worked over 40. 


enter the employee's name, hours worked, and pay rate calculate gross pay = hours worked times pay rate else calculate regular pay = pay rate times 40 calculate overtime hours = hours worked minus 40 calculate overtime pay calculate gross pay = end if print the employee's name and gross

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: