Question: *************Programming Problem 1 Compound Statements // This has a syntax error. It calculates normal pay or overtime pay, // and displays a message indicating which

*************Programming Problem 1 Compound Statements // This has a syntax error. It calculates normal pay or overtime pay, // and displays a message indicating which formula was used. // A) Fix it so it works OK. B) Then combine the two if-else statements // into a single if-else that uses { } to package the appropriate // statements together. When you're finished the program will be easier // to read, and it will work exactly the same. const float RATE=10.00; // pay rate per hour of work for employee float hours, pay; cout>hours; if (hours > 40.0) pay = 40.0 * rate + 50; else pay = hours * rate; cout 40.0) cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
