Your task for this assignment is to use C++ language to implement a net pay function. 1. Implement a net pay function using the C++ programming language. The program should begin by prompting and obtaining three input real number values for hours worked, rate of pay and deductions. Net pay is determined by computing gross pay and then subtracting deductions. Gross pay is the sum of hours worked up to 40 multiplied by rate of pay and hours worked over 40 multiplied by 1.5 times rate of pay, i.e. overtime. A real numer function called “netpay” should receive as arguments the three input values and should return the computed net pay as a result. 2. The program should display the input values and the computed net pay, all clearly labeled on the console. 3. The program file should be named csc231_prog2_lastname.cpp. Your C++ program should contain comments starting on line 1 containing this information: a. The course name, ID and section b. your name c. the file name d. the program assignment number and due date e. the program purpose You are encouraged to add additional comments throughout the program that your feel might be helpful to the reader of your source code.
Your task for this assignment is to use C++ language to implement a net pay function.
1. Implement a net pay function using the C++
begin by prompting and obtaining three input real number values for hours worked, rate
of pay and deductions. Net pay is determined by computing gross pay and then subtracting
deductions. Gross pay is the sum of hours worked up to 40 multiplied by rate of pay and
hours worked over 40 multiplied by 1.5 times rate of pay, i.e. overtime.
A real numer function called “netpay” should receive as arguments the three input values
and should return the computed net pay as a result.
2. The program should display the input values and the computed net pay, all clearly labeled
on the console.
3. The program file should be named csc231_prog2_lastname.cpp. Your C++ program should
contain comments starting on line 1 containing this information:
a. The course name, ID and section
b. your name
c. the file name
d. the program assignment number and due date
e. the program purpose
You are encouraged to add additional comments throughout the program that your feel
might be helpful to the reader of your source code.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images