Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The nation of Progressiva has a simple tax code. The tax you pay is your salary

ID: 3622889 • Letter: T

Question

The nation of Progressiva has a simple tax code. The tax you pay is your salary times the tax rate, and the tax rate is 0.5% per thousand dollars of salary. For example, if you make $40,000, your tax rate is 0.5% times 40, which is 20%, so you pay 20% of $40,000, which is $8,000.

Design and implement a C++ program that computes the net pay (i.e. pay after taxes) of a person with a given salary. Create two auxiliary functions as well as netPay: double taxRate(double salary) and double taxAmount(double salary, double rate). Be sure to use the Design Recipe for each function

Explanation / Answer

please rate - thanks

#include <iostream>
using namespace std;
double taxRate(double salary);
double taxAmount(double salary, double rate);
int main()
{double salary,rate,net,tax;
cout<<"Enter salary: ";
cin>>salary;
rate=taxRate(salary);
tax=taxAmount(salary,rate);
net=salary-tax;
cout<<"net salary: $"<<net<<endl;
system("pause");
return 0;
}
double taxRate(double salary)
{double r;
r=salary/1000.*.005;
return r;
}
double taxAmount(double salary, double rate)
{double t;
t=salary*rate;
return t;
}