<<split>>
so you did get your program to work then???
i am running into the same problem. i get this error
\prob 3.cpp(15) : error C2447: '{' : missing function header (old-style formal list?)
but my programs heading looks just like all i have seen and i cant find anything wrong with the program either. The error is pointing at an empty line.
It's pointing at the line marked as #3 in here.
#include <iostream>
using namespace std;
float main();
{
float income, tax;
int status;
cout<<"***WELCOME***\n"
<<"Enter your income for the year\n";
cin>>income;
cout<<"Enter\t1.) If single\n"
<<"\t2.) If married\n";
cin>>status;
while (status=1)
{
if (income <0)
cout<<"***Error!!!!!*** \n Enter a positive amount\n";
else if (income <21450)
tax=income*0.15
else if (income <51900)
tax= 3217.5 + 0.28*income
else if (income >=51900)
tax=11743.5+0.31*income
}//end of single while loop
while (status=2)
{
if (income<0)
cout<<"***Error!!!!!*** \n Enter a positive amount\n";
else if(income<35800)
tax=income*0.15
else if (income <86500)
tax= 5370.00 + 0.28*income
else if (income >=86500)
tax=19566.00+0.31*income
}//end of married while loop
cout<<"Tax to pay is "<<tax<<endl;
return 0;
}// end of main