Asked by Tanzina

A program is required to calculate the weekly pay for an employee. The pay clerk inputs an
employee ID, hours worked and an hourly rate. The program will output the employee ID, and
Gross Pay. Gross Pay is the sum of regular pay plus any overtime pay earned. Overtime pay is
paid at 1.5 times the pay rate for any hours worked over 40

Answers

Answered by Steve
I'm sure you can do the I/O. The calculation is

if hours <= 0
  print "error - no hours entered"
else if hours <= 40
   pay = rate * hours
else
  pay = rate*40 + rate*1.5*(hours-40)
endif
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions