Here is a C++ program that calculates weekly wages for hourly employees based on the conditions provided:
#include <iostream>
using namespace std;
int main() {
int hours;
float payRate = 10, overtimeRate = 15;
cout << "Enter hours worked: ";
cin >> hours;
float wages;
if(hours <= 40) {
wages = hours * payRate;
}
else {
int overtimeHours = hours - 40;
wages = 40 * payRate + overtimeHours * overtimeRate;
}
cout << "Wages: $" << wages << endl;
return 0;
}
This program uses an if-else statement to calculate