I cant get it to work, only a couple errors listed here....Its for my Intro to Programming class. It's suppossed to calculate overtime pay. Thanks for looking...
Error 2 error C2447: '{' : missing function header (old-style formal list?) c:\users\e136938\documents\visual studio 2012\projects\overtimelab2\overtimelab2\overtimelab2.cpp 11 1 OvertimeLab2
3 IntelliSense: expected a declaration c:\Users\E136938\Documents\Visual Studio 2012\Projects\OvertimeLab2\OvertimeLab2\OvertimeLab2.cpp 11 1 OvertimeLab2
Warning 1 warning C4067: unexpected tokens following preprocessor directive - expected a newline c:\users\e136938\documents\visual studio 2012\projects\overtimelab2\overtimelab2\overtimelab2.cpp 8 1 OvertimeLab2
Here is the code....
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[]);
#include<iostream>;
using namespace std;
{
double hourlyWage;
double hoursWorked;
cout << "Please enter your hourly wage " << endl;
cin >> hourlyWage;
cout << "Please enter how many hours worked " << endl;
cin >> hoursWorked;
if(hoursWorked <= 40);
cout <<(hourlyWage * hoursWorked)<< endl;
else
if hoursWorked >= 40;
cout << "Overtime Pay: " ( (hoursWorked -40) * (hourlyWage *1.5) ) << endl;
system("pause");
return 0;
}