Professional Documents
Culture Documents
Pascal Task Basic
Pascal Task Basic
1. Complete the program below. The purpose of the program is to calculate gross pay
(total pay before tax) based on the following:
• The standard number of hours is 40
• The program should read in the rate of pay
• The program should read in the number of hours worked
• The program should calculate:
The amount of pay for base hours
The number of hours worked overtime
The amount for overtime at 1.5 times the base rate
The total (gross) pay
• The program should display the gross pay
const
base_hrs = 40; {hours for which employee is paid base pay}
ot_rate = 1.5; {overtime rate}
var
hours : real; {total hours worked (must be greater than or equal to 40) }
baserate : real; {hourly pay rate}
base_pay : real; {pay for first 40 hours}
overtime : real; {hours worked in excess of 40 hours}
ot_rph : real; {overtime rate per hour - 1.5 times the pay rate}
ot_pay : real; {pay for overtime hours}
gross_pay : real; {base play plus overtime pay – total pay}
Base_pay :=_________________________________________________
Overtime :=_________________________________________________
OT_rph := _________________________________________________
OT_pay := _________________________________________________
gross_pay := ________________________________________________