Hi, could someone please help me with this error message, I 've included my program along with the error message. Thank you.
Compiling...
C:\Documents and Settings\\Lab7\Lab7.cpp(33) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
Lab7.obj - 1 error(s), 0 warning(s)
#include <iostream>
using namespace std;
double Pay(double rate, double hours);
int main()
{
cout << "The pay for 30 hours at $8.50 is $" << Pay(8.50, 30) << endl;
cout << "The pay for 40 hours at $12.00 is $" << Pay(12.00, 40) << endl;
cout << "The pay for 50 hours at $10.00 is $" << Pay(10.00, 50) << endl;
return 0;
}
double Pay(double rate, double hours) // No semicolon, this is the function
{ // that you write.
int main();
double Overtime_pay, Gross_pay, pay_rate, regular_pay;
if (hours > 40)
{
regular_pay = 40 * pay_rate;
Overtime_pay = (hours - 40.0) * 1.5 * pay_rate;
Gross_pay = regular_pay + Overtime_pay;
}
else
{
regular_pay = 40 * pay_rate;
Gross_pay = regular_pay + Overtime_pay;
{