Ask questions and get helpful responses.

Bachelor of computer science

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

  1. 👍
  2. 👎
  3. 👁
  4. ℹ️
  5. 🚩
  1. 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

    1. 👍
    2. 👎
    3. ℹ️
    4. 🚩

Respond to this Question

First Name

Your Response

Still need help? You can ask a new question.