Overtime

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

#include <iostream>

using namespace std;

int main() {
double wageInitial;
double hoursOvertime;
double payOvertime;

cout << "Monthly Salary: ";


cin >> wageInitial;
cout << "Hours of Overtime: ";
cin >> hoursOvertime;

if (wageInitial >= 3000000){


if (hoursOvertime < 10){
payOvertime = hoursOvertime * 100000;
wageInitial = wageInitial + payOvertime;
}
else if(hoursOvertime <= 20){
payOvertime = hoursOvertime * 125000;
wageInitial = wageInitial + payOvertime;
}
else if(hoursOvertime > 20){
wageInitial = wageInitial + 2500000;
}
}
cout << "Your paycheck this month is: " << wageInitial;
return 0;
}

You might also like