Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1) The cover page 2) The source listing 3) A screen shot of program execution. Thanks! P5.12 Write functions double distance (double x1, double x2,
1) The cover page 2) The source listing 3) A screen shot of program execution. Thanks! P5.12 Write functions double distance (double x1, double x2, double yi, double y2) void midpoint (double x1, double x2, double yi, double y2, double& xmid, double& ymid) void slope(double xl, double x2, double y1, double y2, bool& vertical, double& s) that compute the distance, midpoint, and slope of the line segment joining the points (x1,71) and (x2, Y2). The slope function should either set vertical to true and not set s, or set vertical to false and set s to the slope. Requirements: Please work on P5.13 on page 239. If the input value is invalid, prompt the user to re-enter. Output - your program should print the (new salary) based on the total amount of the raise and original salary. Test Cases: Please use the following test cases to test your program. Case 1: Salary: -$50,000 (Your program should generate an error message and stop processing) Percentage raise: 20% (.20) Message: "Do you want to continue (v)?" Case 2: Salary: $50,000 Percentage raise: - 20% (-.20) (Your program should generate an error message and stop processing) Message: "Do you want to continue (y)?" Case 3: Salary: $50,000 Percentage raise: 20% (20) Message: "Do you want to continue (y)?" Case 4:n send a message: "Exit!" Due date: January 31, 2022 Submission includes
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