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 i need to show the bonus after deducting the 6 hours then multipy the remaining hours by the bonus then add the attendance bonus.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TimCotteeHead of Software ServicesCommented:
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.
hmm dunno it aint accepting my comment
billingtonAuthor Commented:
Edited text of question.
ON-DEMAND: 10 Easy Ways to Lose a Password

Learn about the methods that hackers use to lift real, working credentials from even the most security-savvy employees in this on-demand webinar. We cover the importance of multi-factor authentication and how these solutions can better protect your business!

billingtonAuthor Commented:
Edited text of question.
TimCotteeHead of Software ServicesCommented:
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
  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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
billingtonAuthor Commented:
Thanks for the help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.