CSC 171 - Introduction to Computer Programming

Assignment #7 - A Different Payroll Program

Due Monday, October 9, 2023

An employee is paid at a rate of $16.78 per hour for regular hours worked in a week. Any hours over that are paid at the overtime rate of one and one half times that. From the worker's gross pay:

If the worker has three or more dependents, then an additional $35 is withheld to cover the extra cost of health insurance beyond what the employer pays.

Write a program that will read in the number of hours worked in a week and will then output the worker's gross pay, each withholding amount and the net take-home pay for the week.

Prompt the user for the first employee's payrate and repeat until (s)he enters a number of hours worked that isn't positive.

[Back to the Assignment Index]