Hey guys im having a problem with my cin commands. I have a program that I wrote to tell me the taxes out of my paystub from my lame grocery job. But i have about 5-6 cin commands and it keeps skipping the rest of them after the first one. Here is my code:
// paystub_tax.cpp - Calculates percent of taxes taken out of
// Acme paystubs.
#include <iostream>
#include <iomanip>
using namespace std;
int WeekWage;
int OASDI;
int Medicare;
int Federal;
int State;
int UI;
int main()
{
cout << "This program was created to help all Acme workers calculate the percentage of taxes taken out of their Acme Pay Stubs."
<< endl << endl
<< "Enter your Week's Wages: ";
cin >> WeekWage;
cout << endl << endl
<< "Next enter your OASDI tax amount from your Acme Pay Stub";
cin >> OASDI;
cout << endl << endl
<< "Third enter your Medicare tax amount from your Acme Pay Stub";
cin >> Medicare;
cout << endl << endl
<< "Fourth enter your Federal tax amount from your Acme Pay Stub";
cin >> Federal;
cout << endl << endl
<< "Fifth enter your State tax amount from your Acme Pay Stuf";
cin >> State;
cout << endl << endl
<< "Sixth enter your UI/HC/WD NJ tax amount from your Acme Pay Stub";
cin >> UI;
cout << endl << endl
<< "Acme Pay Stub Tax Percentages"
<< endl
<< setw(6) << "OASDI" << setw(6) << ( OASDI / WeekWage )
<< setw(6) << "Medicare" << setw(6) << ( Medicare / WeekWage )
<< setw(6) << "Federal" << setw(6) << ( Federal / WeekWage )
<< setw(6) << "State" << setw(6) << ( State / WeekWage )
<< setw(6) << "UI/HC/WD NJ" << setw(6) << ( UI / WeekWage );
return 0;
}
// paystub_tax.cpp - Calculates percent of taxes taken out of
// Acme paystubs.
#include <iostream>
#include <iomanip>
using namespace std;
int WeekWage;
int OASDI;
int Medicare;
int Federal;
int State;
int UI;
int main()
{
cout << "This program was created to help all Acme workers calculate the percentage of taxes taken out of their Acme Pay Stubs."
<< endl << endl
<< "Enter your Week's Wages: ";
cin >> WeekWage;
cout << endl << endl
<< "Next enter your OASDI tax amount from your Acme Pay Stub";
cin >> OASDI;
cout << endl << endl
<< "Third enter your Medicare tax amount from your Acme Pay Stub";
cin >> Medicare;
cout << endl << endl
<< "Fourth enter your Federal tax amount from your Acme Pay Stub";
cin >> Federal;
cout << endl << endl
<< "Fifth enter your State tax amount from your Acme Pay Stuf";
cin >> State;
cout << endl << endl
<< "Sixth enter your UI/HC/WD NJ tax amount from your Acme Pay Stub";
cin >> UI;
cout << endl << endl
<< "Acme Pay Stub Tax Percentages"
<< endl
<< setw(6) << "OASDI" << setw(6) << ( OASDI / WeekWage )
<< setw(6) << "Medicare" << setw(6) << ( Medicare / WeekWage )
<< setw(6) << "Federal" << setw(6) << ( Federal / WeekWage )
<< setw(6) << "State" << setw(6) << ( State / WeekWage )
<< setw(6) << "UI/HC/WD NJ" << setw(6) << ( UI / WeekWage );
return 0;
}