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.
1
Expert's answer
2013-02-26T08:38:10-0500
#include<iostream> #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 << rate*hours+1.3*rate*(hours-8); } else { cout << "Daily wage is: "; cout << rate*hours; } return 0; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment