design an algorith and accompanting pseudo code for a program that is required b
ID: 3562557 • Letter: D
Question
design an algorith and accompanting pseudo code for a program that is required by a company to read an empoyee's pay rate and the number of hours worked in a week all given input. the program is then to validate the pay rate and the hours worked feilds and, if both are valid, the program will compute the employees weekly pay and display the pay amount to the user.
Validation: according to the companys rules, the maximum number of hours an employee can work per week is 60 hours, and the maximum hourly rate is 25 per hour. only employees who have worked during the week are eligible for a payment. if the hours worked value or the hourly rate value is out of range, the input data and an appropriate message telling the user that the data input is invalid and why should be printed and no weekly pay will be calculated. if the values are in range, the weekly pay will be calculated and displayed.
weekly pay calculation: weekly pay is calculated as hours worked times pay rate. if the more than 40 hours are worked, payment of the overtime hours worked is calculated at time- and-a-half.
Explanation / Answer
// stringstreams #include #include #include using namespace std; int main () { string mystr; float price=0; int quantity=0; cout > price; cout > quantity; coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.