#include #include using namespace std; int main() { double hours, hourlyrate; double grosspay, taxes, netpay, taxamount; string percentage; cout << "enter hours: " << endl; cin >> hours; cout << "enter hourly rate: " << endl; cin >> hourlyrate; grosspay = hour * hourlyrate; if (grosspay >= 400) { taxes = 0.20; percentage = "20%"; } else if (grosspay >= 200) { taxes = 0.15; percentage = "15%"} { else if (grosspay > 0) { taxes = 0.10; percentage = "10%"; } else if (grosspay <= 0) { cout << "one or either number provided is incorrect. \endl"; cout << "plese re-enter", } netpay = grosspay * (1 - taxes); taxamount = grosspay * taxes; cout << fixed << showpoint; cout cout setw(5) << cout cout }
<< setprecision(2) << "gross pay: << setprecision(2) << "taxes: "(" << percentage << ")" << endl; << setw(20) << "------"; << setprecision(2) << "net pay:
return 0;
$ " << setw(6) << grosspay << endl; " << setw(6) << taxamount << $ " << setw(6) << netpay << endl;