need some help program is having input issues.

this program won't stop and allow the second input of gross pay how do i make it so it will allow the enter of the gross pay?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <iostream>
#include <cmath>
#include <iomanip>

using namespace std;

int main ()

{
	double gross_pay, fed_tax, state_tax,
		soc_sec_med, health_ins, net_pay,
		empl;

	cout << "employee: ";
	cin >> empl;
	cout << "Enter gross amount: $ ";
	cin >> gross_pay;

	fed_tax = (gross_pay * .15);
	state_tax = (gross_pay * .035);
	soc_sec_med = (gross_pay * .085);
	health_ins = 75;

	net_pay = gross_pay - (fed_tax + state_tax + soc_sec_med + health_ins);

	cout << "Employee: " << empl;
	cout << "Gross pay: " << setw(22) << "$ " << gross_pay << endl;
	cout << endl;
	cout << "Withholding: " << endl;
	cout << "Federal Tax: " << setw(20) << "$ " << fed_tax << endl;
	cout << "State Tax: " << setw(22) << "$ " << state_tax << endl;
	cout << "Social Security / Medicare: $ " << setw(3) << "$ " << soc_sec_med << endl;
	cout << "Heatlh Insurance: " << setw(15) << "$ " << health_ins << endl;
	cout << endl;
	cout << "Net Pay: " << setw(24) << "$ " << net_pay << endl;

	return 0;
}
Topic archived. No new replies allowed.