Click here to Skip to main content
15,908,274 members

Comments by Member 12032240 (Top 7 by date)

Member 12032240 4-Oct-15 18:17pm View    
i use else if then else and in else there is no condition can you tell how i solve problem illegle else without if this error shows again and again
Member 12032240 4-Oct-15 18:07pm View    
please can you tell me where am wrong in this !
Member 12032240 4-Oct-15 18:06pm View    
it says illegle else without if
Member 12032240 4-Oct-15 18:04pm View    
Deleted
sorry ?
Member 12032240 4-Oct-15 17:58pm View    
#include<iostream>
using namespace std;
void main()
{
int tax, income;
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
(income > 25000)
tax = (1000 * 0.05) + ((income-25000)*0.1);
cout << "Tax=" << endl;
system("pause");
}