Question: C++ The program below computes a persons gross earnings, the income tax paid, and the net earnings. Write the prototype and function definition for input()

C++

The program below computes a persons gross earnings, the income tax paid, and the net earnings.

Write the prototype and function definition for input() which is to prompt the user for and input the hourly wage and the number of hours worked.

Write the prototype and function definition for calc() which is to calculate the gross earnings, income tax as 20% of gross earnings and the net earnings (gross earnings tax). Gross earnings is hourly wage times hours worked or if hours worked is more than 40, then gross earnings is 40 times hourly wage plus 1.5 times the number of hours worked overs 40.

C++ The program below computes a persons gross earnings, the income tax

paid, and the net earnings. Write the prototype and function definition for

Make no changes to main(). #include #include using namespace std; //Function Prototypes int main(void) { //Variable declaration double hourly; //hourly wage double hoursWorked; /umber of hours worked double gross; //earnings before tax deducted double tax; // amount of income tax 20% of gross double net; /et earnings = gross - tax //Call getData to input hourly wage and hours worked input (hourly, hoursWorked); //Call calc() to compute gross earnings, income tax and net earnings gross = calc(hourly, hoursWorked, tax, net); cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!