Implement a net pay function

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.4: A Case Study: Rectangular To Polar Coordinate Conversion
Problem 9E: (Numerical) Write a program that tests the effectiveness of the rand() library function. Start by...
icon
Related questions
Question

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.
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.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Concept of Parenthesis
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr