Question: I need help in c++ please 1- modify the program to prompt a user for the salary the prompt should tell the user to enter

I need help in c++ please

1- modify the program to prompt a user for the salary the prompt should tell the user to enter -1 when there are no more employees

2- modify the program to accept the user input for salary

3- modify the program to prompt a user input for numDependents

4- modify the program to accept the user input for numDependents

5- add a while loop that will accept an unlimited number of employees and run until the user enters a salary of -1

6- compile and run the program

here is the code

#include using namespace std; int main() { double salary = 1250.00; double stateTax; double federalTax; double numDependents = 2; double dependentDeduction; double totalWithholding; double takeHomePay;

cout << "State Tax: $" << stateTax << endl; stateTax = salary * 0.55; cout << "state Tax : $" << stateTax << endl;

cout << "Federal Tax: $" << federalTax << endl; federalTax = salary * 0.21; cout << "Federal Tax : $" << federalTax << endl;

cout << "Dependents: $" << dependentDeduction << endl; dependentDeduction = ( salary * 0.35) * numDependents; cout << "Dependents : $" << dependentDeduction << endl;

// Calculate Total withholding totalWithholding = stateTax + federalTax;

// Calculate take-home pay here takeHomePay = salary - totalWithholding + dependentDeduction; cout << "Salary : $" << salary << endl; cout << "Take-Home Pay: $" << takeHomePay << endl; return 0; }

4-

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!