Answered step by step
Verified Expert Solution
Question
1 Approved Answer
*************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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started