#include <iostream>

#include <iomanip> // decimal places round off

#include <conio.h> // for _getch()

float reg_wages, overtime, double_overtime, holiday_wages, birthdaybonus_wages,

total_hrs, total_wages;

const float std_hrs = 40.0;

using namespace std;

int main()

{

float hrs_worked;// attain total hrs worked

cout <<"Enter hours worked for the week: ";

cin >> hrs_worked;

float hrly_rate;//attain regular hourly rate

cout <<"Enter hourly rate: $";

cin >> hrly_rate;

float holiday_hrs;//attain amount of holiday hrs

cout << "How many hours were holiday hours? ";

cin >> holiday_hrs;

//maths

if (hrs_worked >= std_hrs)//regular + holiday hrs

{total_wages = (hrs_worked - holiday_hrs) * hrly_rate +

(holiday_hrs *1.5 * hrly_rate);}// works like a dream

else if (hrs_worked >= 40 && hrs_worked <= 60)//overtime

{total_wages = ((hrs_worked - std_hrs) + holiday_hrs) * 1.5 * hrly_rate + // here ?!

(std_hrs - holiday_hrs) * hrly_rate;}

else if(hrs_worked >=60 && hrs_worked <=80)// double overtime

{total_wages = (hrs_worked - std_hrs) * 2 * hrly_rate +

((hrs_worked - std_hrs) + holiday_hrs) * 1.5 * hrly_rate +// also here?!

(std_hrs - holiday_hrs) * hrly_rate;}

If I take out the holiday hrs, it factors in the overtime easily. But when I construct it to add them, it just gives me the overtime and skips holiday hrs in the calculation. Even when I add the same method of calculation: (holiday_hrs *1.5 * hrly_rate); to the conditions block it still gets ignored. I am new to C++ so go easy on me.