Answer to Question #295582 in C++ for Talkiedo

Question #295582

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.

1
Expert's answer
2022-02-09T13:08:27-0500
#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;
}	

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog