Answer to Question #221112 in Algorithms for Bakhtawar

Question #221112

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. 


1
Expert's answer
2021-07-29T03:06:18-0400
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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS