Search for question
Question

✓#2. Design and create a program to calculate the total wages for an employee. An employee is

paid $10 per hour for the first 40 hours. The employee is paid $15 per hour for every hour

greater than 40 hours and up to 50 hours. The employee is paid $20 per hour for any hours

above 50 hours. The program will ask the user to enter the total number of hours (double), and

the program will calculate the total wages (show 2 digits to the right of the decimal point.)

If the user enters an invalid number of hours (hours <= 0), then display an error message and

terminate the program (use "return 0;" to terminate pgm).

Pick good test cases. Include output for all test cases. (Do not compute taxes, just total gross

wages). Individual assignment. Include complete header; use proper indentation; include

appropriate comments.

Fig: 1