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.
4. Submit your C++ program file as an attachment to an email message to
kbyron@bmcc.cuny.edu using a subject in this form: “csc231_prog2_lastname”. No other
files are to be submitted.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images