[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 233
  • Last Modified:

sums in programmes

how do you code a sum that will give a bonus total for a workers overtime payments of £12 per hour. this is for a programmers training course.language is pascal,the employees get a attendance bonus for every 6 hours worked per day then an additional bonus for each hour worked over that.so i need to show the bonus after deducting the 6 hours then multipy the remaining hours by the bonus then add the attendance bonus.
0
billington
Asked:
billington
  • 3
  • 2
1 Solution
 
TimCotteeCommented:
First question, what language?

Second question, if you already know the value is 12 pounds why do you need a sum?

If you can give a little more background then I can certainly help to some extent.
0
 
y2kwackoCommented:
hmm dunno it aint accepting my comment
0
 
billingtonAuthor Commented:
Edited text of question.
0
Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

 
billingtonAuthor Commented:
Edited text of question.
0
 
TimCotteeCommented:
I must confess that my pascal is a little rusty (13+ years ago) however here is a bit of pseudo-code that may help you along the way.

basichours = 0
basicpay = 0
overtimehours = 0
overtimepay = 0
attendancebonus = 0
hoursworked = 0
totalpay = 0

IF hoursworked > 6 then
  basichours = 6
else
  basichours = hoursworked
end if

overtimehours = hoursworked - basichours

IF basichours >= 6 then
  attendancebonus = <some money>
end if

basicpay = basichours * <basic pay rate>
overtimepay = overtimehours * <overtime pay rate>

totalpay = basicpay + overtimepay + attendancebonus
0
 
billingtonAuthor Commented:
Thanks for the help.
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now