Write a program which calculates and displays the Pay of an employee A. The employee is
paid on the basis of number of hours he/she works for. Regular duration of work is 40 hours.Â
Basic pay for regular hours of work is calculated at the rate of 600Rs.per hour. Consider anÂ
employee has worked 45 hours. The pay-rate for each overtime hour is 300Rs. Per hour. UseÂ
variables with proper naming conventions.Â
Algorithm:
Start
  Declare variable hours
  Declare variable amountPay
  Read hours from the user
  if hours<=40
   amountPay=hours*600
  else
   amountPay=(40*600)+(hours-40)*300
  end if
  Display amountPay of an employee A
Stop
Employee has worked 45 hours.
hours>40
amountPay=(40*600)+(hours-40)*300
amountPay=40*600+(45-40)*300
amountPay=24000+1500=25500Rs
Comments
Leave a comment