I am trying to write a program that computes taxes. I keep receiving error mesages saying that there are expected primary expressions before certain things in my program. If anyone could please help me I would greatly appreciate it!!! Thank you :)
#include <iostream>
#include <string>
using namespace std;
int main ()
{
double tax;
double income;
cout << "Please enter your income: " ;
cin >> income;
cout << "Please enter s for single, m for married: ";
string marital_status;
cin >> marital_status;
{
if (marital_status == "s" )
{
if (income => 0 && income <= 8000);
tax = .1 * income;
else if (income > 8000 && income <= 32000);
tax = 800 + .15 * income;
else
(income > 32000)
tax = 4400 + .25 * income;
}
if (marital_status == "m" )
{
if (income => 0 && income <= 16000);
tax = .1 * income
else if (income > 16000 && income <= 64000);
tax = 1600 + .15 * income
else
(income > 64000)
tax = 8800 + .25 * income
}
cout << "The tax is $" << total_tax << endl;
system ("pause");
return 0;
}