// enter input items
cout<<"Enter number of years worked: ";
cin>>YrsWrkd;
cout<<"Enter hours worked: ";
cin>>HrsWrkd;
cout<<"Enter hourly rate: ";
cin>>HrlyRate;
while (YrsWrkd != 99)
{
if (HrsWrkd > 40)
GrossPay = (40 * HrlyRate) + (HrsWrkd - 40) * 1.5 * HrlyRate;
else
GrossPay = HrsWrkd * HrlyRate;
if (YrsWrkd >= 1 && YrsWrkd <= 5)
BnS = GrossPay * 0.05;
else
if (YrsWrkd >= 6 && YrsWrkd <= 9)
BnS = GrossPay * 0.10;
else
if (YrsWrkd == 10)
BnS = GrossPay * 0.15;
else
if (YrsWrkd > 10)
BnS = GrossPay * 0.20;
else
cout<<"Invalid Number of Years Was Entered"<<endl;
} //end while
//display output
cout<<"\nYour Gross Pay is: $"<<GrossPay<<endl;
cout<<"Your Bonus Is: $"<<BnS<<endl<<endl;
cout<<"THANK YOU"<<endl<<endl;
return 0;
} //end of main function
Here, i fixed it up 4 u, i used the character o instead of a number, enjoy your code and you have quite a lot of weak spots in your programming, don't keep using endl, use \n for new line =):