you are not using
{ and
} that will give you error:
illegal else without if
#include<iostream>
using namespace std;
void main()
{
int income;
float tax; cout << "please enter your income" << endl;
if(income <= 15000)
{ cout << "No Tax on you ! keep enjoying";
} else if(income <= 25000)
{ tax = (income - 15000)*0.05;
cout << "Tax=" << tax << endl;
} else if(income > 25000) { tax = (10000 * 0.05) + ((income-25000)*0.1);
cout << "Tax=" << endl;
} system("pause");
}
</iostream>