A bookstore owner wishes you to write down the program to compute store's weekly payroll. Store's employees are paid hourly. Overtime is to be paid at rate of 1.5 times normal rate for hours employee worked over 40. Program must prompt user to enter number of hours employee worked and pay rate for employee. Program must display regular pay, overtime pay, and gross pay for that employee. Then program must prompt user to enter data for another employee. When user responds that there are no more employees to process, program must display number of employees it processed and total payroll, that is, sum of gross salaries of employees.
The program must validate pay rate as it is entered. Only valid hourly pay rates are following: 5.50, 6.00, 6.50, 6.75, 7.00, 7.25, 7.50, 7.75, 8.00. Store rates in array. When pay rate is entered, search array for a match. If there is match, continue rest of the calculations. If there is no match, display error message, a list of valid pay rates, and prompt for another pay rate.