OBJECT: To compute the net pay of an employee, given his/her pay rate, number of hours, and tax rate. INPUT: his/her name, pay rate, and number of hours. You will prompt the user with a friendly message to enter the employee’s name, pay rate and number of hours. Note that you must use the dash (-) to connect the first name to the last name so that the name can be read using the cin statement. For example, John-Doe OUTPUT: the employee’s gross pay, tax deduction, and net pay. For example: Name: John-Doe Your gross pay is: 900.00 Your tax deduction is: 90.00 Your net pay is: 810.00 METHOD: the gross pay is the pay rate times the number of hours. The tax deduction is computed as follows: If the gross pay is less than 1000.00, it is 10% of the total pay; otherwise, it is 15% of the gross pay. The net pay is the gross pay minus the tax deduction. TOPICS: input with cin; formatted output with cout;, program documentation; proper program indentations; and two-way selection structures.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
OBJECT: To compute the net pay of an employee, given his/her pay rate, number of hours, and tax rate.
INPUT: his/her name, pay rate, and number of hours. You will prompt the user with a friendly message to enter the employee’s name, pay rate and number of hours.
Note that you must use the dash (-) to connect the first name to the last name so that the name can be read using the cin statement. For example, John-Doe
OUTPUT: the employee’s gross pay, tax deduction, and net pay. For example:
Name: John-Doe
Your gross pay is: 900.00
Your tax deduction is: 90.00
Your net pay is: 810.00
METHOD: the gross pay is the pay rate times the number of hours.
The tax deduction is computed as follows: If the gross pay is less than 1000.00, it is 10% of the total pay; otherwise, it is 15% of the gross pay.
The net pay is the gross pay minus the tax deduction.
TOPICS: input with cin; formatted output with cout;, program documentation; proper program indentations; and two-way selection structures.
You must return the following (in this order):
- The program source file
- The program output.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps