Question: Write a C++ program to calculate the weekly net pay of an hourly employee, given the number of hours the employee worked during the week
Write a C++ program to calculate the weekly net pay of an hourly employee, given the number of hours the employee worked during the week and their hourly pay rate.
Notes:
The number of hours worked will always be an integer
The percent of deductions subtracted from the employees gross pay will be a named constant with a value of 33.3%
Output the input values, the gross pay, the amount of deductions, and the net pay
Don't worry about decimal places in your output yet
Display the money values with dollar signs, these will go inside the end of the descriptive strings, like this -> "Pay rate $"
The tab key won't work correctly within a string, so use spaces to line up your end quotes in the cout statement descriptive strings
Test the program twice:
For an employee who worked 40 hours and makes $9.75/hour
Then an employee who worked 35 hours and makes $12.25/hour.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
