Syntax errors question

I have a couple of syntax errors that I cannot quite figure out. This program is to equate one's personal taxes. A filing status and taxable income is entered. I have already coded my single filing status ( status == 0) I have yet to do the remaming 3. One of my return 0; is flagging a couple of erros. Is this because I have yet to input the other 3 codes or is there a simple mistake somewhere? thanks



#include <iostream>
using namespace std;

int main()
{
//prompt the user to enter filling status
cout << "Enter the filing status\n"
<< "(0-single filer, 1-married jointly,\n"
<< "2-married seperatly, 3-head of household): ";
int status;
cin >> status;

// Prompt the user to enter taxable income
cout << "Enter the taxable income: ";
double income;
cin >> income;

// Compute Tax
double tax = 0;

if ( status == 0)
{
//compute tax for single filer
if (income <= 6000)
tax = income * 0.10;
else if (income <= 27950)
tax = 6000 * 0.10 + (income - 6000) * 0.15;
else if (income <= 67700)
tax = 6000 * 0.10 + (27950 - 6000) * 0.15 + (income - 27950) * 0.27;
else if (income <= 141250)
tax = 6000 * 0.10 + (27950 - 6000) * 0.15 + (67700 - 27950) * 0.27 + (income - 67700 * 0.30);
else if (income <= 307050)
tax = 6000 * 0.10 + (27950 - 6000) * 0.15 + (67700 - 27950) * 0.27 + (141250 - 67700) * 0.30 + (income - 141250) * 0.35;
else
tax = 6000 * 0.10 + (27950 - 6000) * 0.15 + (67700 - 27950) * 0.27 + (141250 - 67700) * 0.30 + (307050 - 141250) * 0.35 + (income - 307050) * 0.386;
}
else if (status == 1)
{



}
else if (status == 2)
{


}
else if (status == 3)
{



}
else
{
cout << "Error: invalid filing status";
return 0;
}

//Display Results
cout << "Tax is" << static_cast<int>(tax * 100) / 100.0 << endl;

return 0;
}





return 0;
}





errors:

(70) : error C2059: syntax error : 'return'
(71) : error C2059: syntax error : '}'
(71) : error C2143: syntax error : missing ';
(71) : error C2059: syntax error : '}'


if you dont indent your code, you will never be able to find these kind of error's.

remove the last return and the closing brace. its extra.
Topic archived. No new replies allowed.