You can't have code between the int main() and the first brace. All that code should be after the brace. Also, watch typos, (like missing underscores when typing variable names).
Printable View
You can't have code between the int main() and the first brace. All that code should be after the brace. Also, watch typos, (like missing underscores when typing variable names).
You're also missing a semicolon here:
Code:cout<<"Anual Income = $" <<anual_income<<endl
No, that statement continues on the next line, so no semicolon is needed, although that's probably not the clearest way to do write it anyway.
Oops. :)
This
has several redundant expressions, marked in red. (That's what else statements do, you know. They only execute if the if was false.)Code:if (anual_income<=12000)
tax_due=a;
else if ((anual_income>12000) && (anual_income<=25000))
tax_due=(anual_income-12000)*b;
else if (anual_income>25000)
tax due=((anual_income-25000)*c)+d;