int main()
{
do
{
hours = getHoursWorked();
rate = getPayRate();
pay = calcGross(hours, rate);
//***********Display information*************
cout << fixed << setprecision(2); // writes point values in scientific notation / sets the decimal point.
cout << "grossPay:$" << pay << endl;
cout << "\n\nWould you like to process another employee? ('Y' to Proceed 'N' to Stop):";
cin >> loopy;
loopy=toupper(loopy);
if (loopy!= 'Y' && loopy != 'N')
{
cout << "\n\nWould you like to process another employee? ('Y' to Proceed 'N' to Stop):";
cin >> loopy;
loopy=toupper(loopy);
cout<<endl;
}
} while(loopy == 'Y'); //end while
system("pause");
return 0;
}
//********************************************End of main***********************************************
woooooow, omg im so dumb, why couldnt i see this. thanks soooo much
No, you are not dumb. It is easy to get used to our own code to the point we don't see our own mistakes staring us in the face. A second set of eyes can frequently find things we don't see.
As you get more experience, you will recognize error messages and better understand the hints they give you as to what to look for in your code.