78 439
Assignments Done
Successfully Done
In September 2019

Answer to Question #24295 in C++ for sarah

Question #24295
write a c++ program that will input employee name, rate per hour, number of hours worked and will compute the daily wage of an employee. if the number of hours worked exceeds eight hours add 30% to each excess hours as an overtime rate. formula: daily wage=rate per hour x number of hours worked + OT pay.
Expert's answer
#include <string>
using namespace std;

int main() {
string name;
double rate, hours;
cout << "Enter employee name: ";
cin >> name;
cout << "Enter rate per hour: ";
cin >> rate;
cout << "Enter number of hours: ";
cin >> hours;
if (hours>8) {
cout << "Daily wage is:
cout <<
else {
cout << "Daily wage is:
cout << rate*hours;
return 0;

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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions