cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Payroll
Payroll
Oct 30, 2015 at 11:54pm UTC
KOLby
(1)
I can't seem to find whats going wrong with my code. everything works except gross pay value. I don't know why its off and bcze of that my other values are off :(
any help would be appreciated
//
//Process Section
//
full_name = last_name + ", " + first_name;
gross_pay = hours* pay_rate;
taxes = TAX_RATE * gross_pay;
net_pay = gross_pay - taxes - PARKING_DEDUCTION;
overtime_hours = hours - MAX_HOURS;
//
//OvertimeCalculation
//
if( hours > MAX_HOURS)
{
regular_hours = MAX_HOURS;
overtime_hours = hours - regular_hours;
}
else
{
regular_hours = hours;
overtime_hours = 0;
}
Oct 31, 2015 at 12:08am UTC
SamuelAdams
(1535)
just cout all the values before you display the results and trace it back to find the source of the issue.
Topic archived. No new replies allowed.