Sep 27, 2018 at 10:36pm UTC
been working on this wage calculator for a while and i cannot get it to print the tax and net pay. please someone tell me what ive done wrong.
#include <iostream>
using namespace std;
int main()
{
double wage;
double hours;
double tax_rate;
double Tax;
double gross_pay;
double net_pay;
cout << "Apollyon Bakery\n " << endl;
cout << "Wage Caculator\n " << endl;
cout << "Enter the hourly wage amount :$ ";
cin >> wage;
cout << "Hours worked : ";
cin >> hours;
cout << "You entered the following :" << endl << endl;
cout << "Hourly wage: $ " << wage << endl;
cout << "Hours worked :" << hours << endl;
tax_rate = 0.27 * 100;
cout << "The tax rate is: " << tax_rate << "% " << endl << endl;
gross_pay = wage * hours;
cout << "Gross Pay: $ " << gross_pay << endl;
cin >> gross_pay;
Tax = gross_pay * tax_rate;
cout << "Tax:$ " << Tax << endl;
cin >> Tax;
net_pay = gross_pay - Tax;
cout << "Net Pay: $ " << net_pay << endl;
cin >> net_pay;
system("pause");
return 0;
}
Sep 27, 2018 at 10:57pm UTC
sorry im new to this. I thought i need 33, 37, 41 but looking now i do not. Tax and netpay do not print totals on screen on my end it needs to show that and it does not. what do you mean by code tags?
Last edited on Sep 27, 2018 at 11:01pm UTC
Sep 27, 2018 at 11:18pm UTC
yes i took those out and it works but now i cannot get it to use a decimal on the Tax and i cannot get the net pay to do right. been at this for 8 hours.