Assignment 3

Due Monday 24 September at 1am.

This program will use input, output, and decision structures such as if/else.

Your program will ask the user to input the number of hours worked this week. It will then print out the amount of money the user made, according to the following rules:

  • Employees are paid $12/hour for up to (and including) 40 hours per week.

  • For any hours beyond 40, employees are paid an overtime rate of $16/hour.

  • A weekly income below $400 is taxed at 10%. An employee making over $400/week is taxed instead at 12%.

Below are some sample runs of the program:

Enter hours worked this week: 30
Your gross pay is $360.0
Your tax is $36.0 (10%)
Your net pay is $324.0
Enter hours worked this week: 45
Your gross pay is $560.0
Your tax is $67.2 (12%)
Your net pay is $492.8
Enter hours worked this week: 40
Your gross pay is $480
Your tax is $57.6 (12%)
Your net pay is $422.4.

Sync with git to get an empty file in cs102/a03/payroll.cpp. Save your solution to that file. Sync with git again to submit.