Overtime Pay Example

This example further demonstrates the use of conditionals and shows the structure of a somewhat more complicated input-output program.

This script calculates your weekly pay based upon your hourly rate and the number of yours you worked that week.
Overtime is paid at a rate of 1.5 the normal hourly rate for any hours worked over 40 in a week.