Determine the weeks earnings for an employee from the hourly paid rate and hours worths for the rate.report the gross earnings(including overtime earnings) for the week.
#include<iostream>
using namespace std;
int main()
{
double hourlyPaid;
cout << "Please, enter hourly paid: ";
cin>> hourlyPaid;
int hours;
cout << "Please, enter worked hours: ";
cin >> hours;
//Suppose, that overtime hours are paid with coefficient 1.5
int overhours;
cout << "Please, enter overtime hours: ";
cin >> overhours;
cout << "Gross earning is " << hourlyPaid*hours + overhours*hourlyPaid*1.5;
}
Comments
Leave a comment