#include using namespace std; int main() { double hours, rate; double basePay, overtime = 0; cout << "Enter your hourly rate of pay: $ "; cin >> rate; cout << "Enter the number of hours you worked this week: "; cin >> hours; if (hours > 40) { basePay = 40 * rate; overtime = 1.5 * rate * (hours - 40); } else basePay = hours * rate; cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); cout << "Hours worked = " << hours << '\n'; cout << "Hourly pay rate = " << rate << '\n'; cout << "Base pay = " << basePay << '\n'; cout << "Overtime pay = " << overtime << '\n'; cout << "Total paycheck this week = " << basePay + overtime << '\n'; return 0; }