Hi, I'm sure this will be horribly simple to most here but as a beginner it's 'doing my head in'

I've got a simple exercise to work through. The brief is as follows:

"A man is paid at the hourly rate of $8 per hour for the first 35 hours worked. After that, overtime is paid at 1.5 times the hourly rate for the next 25 hours worked and twice the hourly rate for further hours worked. Write a program to input the number of hours worked in a week, and calculate and display his basic pay, overtime pay and gross pay."

So, the basic hours part is fine. It's after that point that I'm hitting a wall. How to calculate the first 35 hours at one pay rate THEN the rest at a second and third rate.

If anyone can show me some code or even just a few pointers it would help. And no, your not doing my 'homework' for me - have lots of other exercises of a similar nature, I'm just trying to grasp the principle. Said it was simple.....

Cheers.